Page 1 of 1

int to str bug?

PostPosted: Mon Jan 16, 2023 1:34 pm
by richardb
Hi I don't know what the activity is on here any more but I think I have found a bug with int to str function.

this works

Code: Select all
dim myvalue as ushort = 345
   dim mystring as string = "abc"
   mystring = str(myvalue)                         
   debug( 10,13,"[ ",  mystring," ]",10,13)


This hangs after printing start

Code: Select all
dim myvalue as uINTEGER = 345
   dim mystring as string = "abc"
   debug( 10,13,"start",10,13)
   mystring = str(myvalue)                         
   debug( 10,13,"[ ",  mystring," ]",10,13)


but this works

Code: Select all
   dim myvalue as uINTEGER = 345
   dim mystring as string = "abc"
   debug( 10,13,"start",10,13)
   mystring = str(myvalue,5)                         
   debug( 10,13,"[ ",  mystring," ]",10,13)


ps it also hands using integer.



Thnaks

Rich

Re: int to str bug?

PostPosted: Tue Jan 17, 2023 6:56 pm
by David John Barker
Thanks for reporting - I assume this is for 16 bit builds? And the difference between "hangs" and "works" is the tab before dim myvalue in the last example?

Re: int to str bug?

PostPosted: Wed Jan 18, 2023 10:04 am
by richardb
This is actually for 32 bit builds. and hangs in the str( function.