Sorry, I actually meant UBYTE = &h100. Interestingly, "dim a as ubyte = 256" (result a = 0) gives a compiler warning: "Overflow in constant conversion", but "dim a as byte = 128" (result a = -128) seems perfectly fine, and "dim a as ubyte = -1"(result a = 255) also seems fine. In all cases bit shifting should go either with or without warning.Josep Roca wrote:> FreeBASIC also allows UBYTE = &h80 without any protest
Guess you mean BYTE...
For pointers? Yes. Try this:Josep Roca wrote:Isn't it easier just don't use const?
Code: Select all
dim as zstring ptr p
dim as const string s = "FreeBASIC"
p = strptr(s)