www.retrosoftware.co.uk
http://www.retrosoftware.co.uk/forum/

Hexadecimal conversion to strings
http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=82
Page 1 of 1

Author:  FrancisL [ Mon Apr 07, 2008 12:24 pm ]
Post subject:  Hexadecimal conversion to strings

Is there any way of converting a number as hex to a string? Essentially what I am trying to do is this:

A$=STR$(~NUMBER)

As you are probably aware this will just result in an error.

Kind regards,

Francis.

Author:  RichTW [ Mon Apr 07, 2008 12:58 pm ]
Post subject:  Re: Hexadecimal conversion to strings

curiously, A$=STR$~number (without the brackets) works just fine :)


edit: or A$=STR$~(number)

seems to be a special case in the parsing of STR$.

Author:  FrancisL [ Mon Apr 07, 2008 2:00 pm ]
Post subject:  Re: Hexadecimal conversion to strings

I just knew it would be something simple like that. :roll:

Thanks! :D

Kind regards,

Francis.

Author:  jgharston [ Tue Aug 25, 2009 4:16 pm ]
Post subject:  Re: Hexadecimal conversion to strings

RichTW wrote:
curiously, A$=STR$~number (without the brackets) works just fine :)
edit: or A$=STR$~(number)
seems to be a special case in the parsing of STR$.


It's not a special case. ~ is a parameter to STR$, not a function.

The syntax is: STR$[~]<expression>

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/