Wrong Notation of Tick value

Discussion in 'Questions (Windows Mobile)' started by Zenerdiode, May 27, 2008.

  1. Zenerdiode

    Zenerdiode Active Member Licensed User

    I apologise if I have posted this in the wrong forum; I don't know if it is a bug or not. I'm manipulating tick values to place time stamps in a file. All my work in the IDE and non-Optimised compilation stores the tick value in full, however once compiled with optimised compilation, the tick values are stored in E scientific notation.

    This then causes problems when evaluating and comparing values. Again I've stripped out all my project and provided a simple .sbp to show. Compile and build an optimised compilation and then either use the IDE or compile a non optimised version, store a tick value and then check it in both versions with the 'Stored Correctly?' button. Then try vice versa.

    I'd prefer to have the tick value stored in full...

    Many Thanks,

    Christopher
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can force it to use the fixed point notation by replacing:
    Code:
    DateParse(Date(Now))
    With:
    Code:
    Format(DateParse(Date(Now)),"F0")
     
  3. specci48

    specci48 Well-Known Member Licensed User

    Hi Zenerdiode,

    I modified your code so that the comparision works always fine, even with optimized compilation. The trick I used is to store the DateParse value into a decimal variable before saving or comparing it.

    Maybe this can only be called a workaround, but hey... ;)


    Cheers
    specci48

    Edit: As usual, no change to be faster than Erel... :sign0161:
     
  4. Zenerdiode

    Zenerdiode Active Member Licensed User

    Many thanks to both of you. I genuinely appreciate the help all are giving to me in the early stages of learning Basic4ppc. I can't help but feel all my posts are a little one-sided at the moment - i.e. I'm asking all the questions and you lot are providing almost instant answers!
     
  5. specci48

    specci48 Well-Known Member Licensed User

    There's no problem with that! Because without these questions were wouldn't have thoses wonderful small "races", if we can answer a question faster than Erel... :sign0060: Even he has to correct us sometimes or gives a much more precisely answer. :sign0027:
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice