Menu

Is it safe to use SysLongTempX?

Help
2019-11-14
2019-11-14
  • Jim giordano

    Jim giordano - 2019-11-14

    SysLongTempX is not documented in the help, but by scrounging around I found I could use it.
    SysCalcTempX doesn't return a long remainder.

    I tested it with-

    dim xin,rem1,rem2 as long
    dim res
    xin=4294967295
    
    res=xin/1000000000
    rem1=SysCalcTempX
    rem2=SysLongTempX
    locate 0,0
    print xin
    locate 1,0
    print res
    locate 2,0
    print "CalcX=":print rem1
    locate 3,0
    print "LongX=":print rem2
    

    Which returned
    4294967295
    4
    CalcX=255
    LongX=294967295

    So it looks like SysCalcTempX is type byte.

    SysLongTempX is returning the correct answer for the remainder, but since it isn't documented, I fear future changes in the compiler might cause a problem.

     
  • Anobium

    Anobium - 2019-11-14

    It is safe. Not going to be changing this.

    SysCalcTempX is documented see 'Setting Variables' in the Help.

    I am not sure about SysLongTempX, if you have tested and you think it is valid - it is safe. We would be changing that.

     

Log in to post a comment.

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.