Menu

#252 No four trailing zeros in time("elapsed") and time("reset") output

5.0.0
closed
Erich
None
5
2023-01-01
2017-09-12
Erich
No

Rexxref for time("elapsed") and time("reset") says

returns sssssssss.uuuuuu .. has always four trailing zeros in the decimal portion.

Actually, the ouput has three trailing zeros on Windows, no trailing zeros on Linux, and has no decimal digits at all for a zero result.

I suggest to just remove the "has always four trailing zeros in the decimal portion" from the docs

Discussion

  • LesK

    LesK - 2017-09-12

    I suggest the documentation simply reflect reality. As a guess, the 'trailing zeroes' part
    was probably derived from the VM Ref, where the original statement about Elapsed
    was copied down to the Reset section (at least in my copy). I'd have to check my Draft
    of Object Rexx to see what the wordsmiths wrote for the pc, and it's tucked away upstairs!

     
    • Erich

      Erich - 2017-09-12

      According to
      https://www.ibm.com/support/knowledgecenter/en/SSB27U_6.3.0/com.ibm.zvm.v630.dmsb1/time.htm
      the REXX/VM Reference says "The fractional part always has six digits." for
      both TIME("E") and TIME("R").

      But I don't think it's true: at least on a REXX370 4.02 01 Dec 1998 the
      output for a simple say time('e') is 0. No decimal digits at all.

       
  • Erich

    Erich - 2017-09-12
    • status: open --> pending
    • assigned_to: Erich
     
  • Erich

    Erich - 2017-09-12

    Committed change with revision [r11295]

     

    Related

    Commit: [r11295]

  • LesK

    LesK - 2017-09-12

    Time(E) certainly behaves differently than what is documented. This simple THE
    macro:

    call time 'R'
    say result
    b=0
    do i=1 to 10000
    b=i+1
    End
    say time('E')
    exit

    yields:
    0
    0.003000

    I'd guess that your simple Say Time('E') is actually 'correct', since the
    definition reuires a Reset.

    Also, I checked the Object Rexx Beta draft and the current doc was
    directly copied from that OS/2 manual which, in turn, reworded it from
    the VM Ref of the same timeframe.

    I'm in favor of documenting the actual behavior, thus avoiding future
    Doc issues.

     
  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.