Hi,
What is the way to compile Hexadecimal numbers with Qliberator and SMSQ/E.
SMSQ/E can display hexadecimal numbers prefixed with a $ symbol.
Unfortunatley, Qliberator gives an error when trying to compile the statement.
Strangely enough, Turbo compiles this with no errors and works as expected.
Hex Compiling
-
- Font of All Knowledge
- Posts: 3972
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Hex Compiling
Derek,
There's an utility somewhere on Per's site (just recently re-opened), I believe, that replaces all hexadecimal constants in S*Basic programs with decimals for compilation. Should come in handy here.
(Thus, this is a just-in.time question)
Tobias
There's an utility somewhere on Per's site (just recently re-opened), I believe, that replaces all hexadecimal constants in S*Basic programs with decimals for compilation. Should come in handy here.
(Thus, this is a just-in.time question)
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Hex Compiling
You can use that. But if you have a lot of these hex constants in a program, this mightJonS wrote:Why not use HEX command?
- be quite some work
- be slow (runtime-wise): QLiberator is not smart enough to see that HEX("<constant>") is still a constant and uses valuable time to do the conversion at run-time. Replacing the hex constant with a "real", numerical constant is much faster
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Hex Compiling
Yes, I've found it here ... http://www.knoware.no/tofro wrote: There's an utility somewhere on Per's site (just recently re-opened), I believe, that replaces all hexadecimal constants in S*Basic programs with decimals for compilation. Should come in handy here.
It can be found under ENTER / GO SUB / DeHex
It looks like a very neat procedure.
Regarding Turbo, I note that it's not possible to compile a $0 or %0.
Those cases would have to use a plain 0.
Michael