flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > value out of range: fix

Author
Thread Post new topic Reply to topic
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
from the manual i read

Quote:

The fix directive can be used for syntax adjustments related to directives of preprocessor, what cannot be done with equ directive. For example:

incl fix include

defines a short name for include directive, while the similar definition done with equ directive wouldn't give such result, as standard symbolic constants are replaced with their values after searching the line for preprocessor directives.


i thought i could use that feature to allow me to have one source code but compile to unicode, then change the fix directive, compile again and this time have ASCII strings.
one for 9x systems and unicode for NT.

but when i try and compile it, it gives me "value out of range". i looked up about how to do this in the manual and found what i pasted above.
my apologies anyway.

Code:
; CHANGE: Unicode is du
; ASCII is dd
str fix dd

firstname str "First"
lastname str "Last" 
    


Quote:
Post 18 Oct 2005, 23:41
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
for unicode use "dw", not "dd"
Post 18 Oct 2005, 23:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
You mean "db" for ASCII and "du" for WideChar, don't you? Wink
Post 18 Oct 2005, 23:46
View user's profile Send private message Visit poster's website Reply with quote
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
oh dear im so silly, yes Tomasz. Smile

i was concentrating on getting it to work that i forgot characters are 1 byte and because d looks like b late at night Smile

thankyou for spotting that !

Code:
   str fix db
   ;str fix du ; uncomment for NT systems

firstname str "First"
lastname str "Last"
another str "yet anther" 
    
Post 19 Oct 2005, 07:29
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
oh, same mistake again... grrr
Post 19 Oct 2005, 08:08
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.