Code: Select all
' #cmdline "-gen gcc"
screen 19,32
color rgb(0,0,15),rgb(255,255,255)
cls
print iif(color=rgb(0,0,15),"Yes","No")
sleep
Code: Select all
' #cmdline "-gen gcc"
screen 19,32
color rgb(0,0,15),rgb(255,255,255)
cls
print iif(color=rgb(0,0,15),"Yes","No")
sleep
Code: Select all
iif(culng(color)=rgb(0,0,15),"Yes","No")
Code: Select all
screenres 400,300
dim as any ptr i=imagecreate(100,100,2)
dim as ubyte ptr pi
dim as long x,y,pitch,size
Imageinfo i,x,y,,pitch,pi,size
open "data.txt" for output as #1
for n as long=0 to size
print #1,n;" ";pi[n]
next
close #1
print size,y*pitch
shell "notepad data.txt"
kill "data.txt"
Code: Select all
'' Image buffer header, new style (incorporates old header)
''
type IMAGE field = 1
union
old as _OLD_HEADER
type as ulong
end union
bpp as long
width as ulong
height as ulong
pitch as ulong
_reserved(1 to 12) as ubyte
' '' properties
' declare property pixels() as ubyte ptr
end type
Code: Select all
screen 20,32
Line(20,20)-(500,600),Rgb(255,255,255),,&b10
sleep
Code: Select all
dim as single x=35879
print cshort(x)
sleep
'-32768 32 bits
'-29657 64 bits
Code: Select all
dim as short y=35879
print y
dim as long z=35879
print cshort(z)
dim as single x=35879
print cshort(x)
sleep
' with gas
' -29657
' -29657
' -32768
' with gcc or gas64
' -29657
' -29657
' -29657