|
Post by Nicky Peter Hollyoake on Mar 27, 2008 17:41:57 GMT -5
LeapYear and even command get it Here. EXAMPLES: Dim Number
Do
Number = RND() % RND_MAX if Even(Number) Then Printr Number + " = " + "EVEN"
Else
Printr Number + " = " + "ODD" Endif
Sleep(300) Loop if LeapYear(2008) Then Print"Leap Year"
Else
Print"Normal Year" Endif
|
|
|
Post by Nicky Peter Hollyoake on Mar 28, 2008 7:08:46 GMT -5
Been messin' about with even can be pretty useful. Dim Switch Dim X, Y
Dim Odd#(1)(2) Dim Even#(1)(2)
Odd#(0) = Vec3(0, 255, 0): Odd#(1) = Vec3(255, 0, 0) Even#(0) = Vec3(255, 0, 0): Even#(1) = Vec3(0, 255, 0)
TextMode(TEXT_BUFFERED) SetTextScroll(FALSE)
While TRUE: CLS
For Y = 0 To (TextRows() - 1) For X = 0 To (TextCols() - 1)
if Even(X + Y) Then Color(Even#(Switch)(0), Even#(Switch)(1), Even#(Switch)(2)) Else Color(Odd#(Switch)(0), Odd#(Switch)(1), Odd#(Switch)(2)) Endif
Print"*"
Next Next
Switch = - Not Switch
DrawText() Sleep(300) Wend Come in handy for my 3D chess game (which I have to restart anyways, but i'm gonna make a few commands before I start again to make it easier)  . Nicky P. S. Maybe someone could make a celender with it too.
|
|