Page 1 of 1

Posted: Thu Jan 31, 2002 8:10 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.

[== Need your help - .byte > 127? ==]

I need your help! I created a big DataSection with vals between 0-255 and i declared it as .byte! Vals between 0-127 are ok but the compiler dont like it when there are data.b > 127 ;(( Ofcourse i could save the DataSections as .word and read the stuff as byte - every second byte will be 0... Mhhh... i am not very happy about this situation! Is there any way how to save .b up to 255 ???

Code: Select all

    OpenConsole()
        ;
        For i = 0 To 5
            Read a.b  
            PrintN (Str(a.b))
        Next
        ;
        Delay (2000)
    CloseConsole()
    End
    ;
    ;--------------------------
    ;
    DataSection
        Data.w   80,120,127,128,190,255		; Normaly as Data.b for handling (0-255)
    EndDataSection

Fred, what about the following feature for the next version like on amiga version?:

Byte: .b, takes 1 byte in memory, Range: -128 to +127
Word: .w, takes 2 byte in memory, Range: -32768 to +32767
Long: .l, takes 4 byte in memory, Range: -2147483648 to + 2147483647


Unsigned Byte: .ub, takes 1 byte in memory, Range: 0 to 255
Unsigned Word: .uw, takes 2 byte in memory, Range: 0 to 65535
Unsigned Long: .ul, takes 4 byte in memory, Range: 0 to 4294967295


PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Edited by - MrVainSCL on 31 January 2002 20:11:31

Posted: Thu Jan 31, 2002 8:47 pm
by BackupUser
Restored from previous forum. Originally posted by TronDoc.

YIKES!
I would've expected the .b to be
unsigned also....
....this being a BASIC, I'd have
expected all of them to be unsigned.
I suppose for inline ASM compatiblity though???? -jb