The first
Sync command executed in a DarkBASIC Professional program does not work.
Test it for yourself. Run the code below as it is, then uncomment the second line and run again. Or comment out the first uncommented Sync for a different test.
Even with this bug, DBP is much, much better than DarkBASIC v1.13 sync functionality. There the Sync command is useless, since the
Sync On command is dysfunctional. You can not prevent Sync from being called. Run this same program in DBC to prove it.
Sync On
` Sync
XPOS= 0
For IND= 1 To 12
Ink Rgb(Rnd(255),Rnd(255),Rnd(255)),0
Box XPOS,50,XPOS+50,100
Get Image IND,XPOS,50,XPOS+50,100
Inc XPOS,50
Set Sprite IND,0,1
Next IND
Sync
Wait 400
Cls 0
Ink Rgb(255,255,255),0
Print "Program Running"
Wait 400
Sync
Wait 400
XPOS= 1
For IND= 1 To 12
XPOS= NEXTBOX(XPOS)
Wait 400
If IND= 7 Then Sync
Next IND
Ink Rgb(255,255,255),0
Print "Press a key to end."
Sync
Wait Key
End
Function NEXTBOX(XP)
Ink Rgb(Rnd(255),Rnd(255),Rnd(255)),0
Sprite XP,(XP-1)*50,220,XP
Inc XP
Endfunction XP
The more you see, the more you know.
The more you know, the more you see.