int to str bug?

Discuss the Firewing language

int to str bug?

Postby richardb » Mon Jan 16, 2023 1:34 pm

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
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: int to str bug?

Postby David John Barker » Tue Jan 17, 2023 6:56 pm

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?
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: int to str bug?

Postby richardb » Wed Jan 18, 2023 10:04 am

This is actually for 32 bit builds. and hangs in the str( function.
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x