programs/globTest.toby
author Ryan C. Gordon <icculus@icculus.org>
Tue, 18 Mar 2008 02:05:22 +0000
changeset 499 96e88f292dc8
parent 1 d7cb562e4e24
permissions -rw-r--r--
Updated Lua from 5.1.1 to 5.1.3.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
//---------------------------------------------------
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
// If globals are working correctly, this should
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
//  draw a line east, WAY off the edge of
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
//  TurtleSpace. Otherwise, it'll just draw a 
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
//  line somewhere other than due east, or maybe just
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
//  draw a line about 5 pixels wide or give an error
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
//  or something like that.
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
//
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
//Copyright (c) 1999 Lighting and Sound Technologies.
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
// Written by Ryan C. Gordon.
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
//---------------------------------------------------
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
number thisIsGlobal = 90
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
function main() returns nothing
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
	disableFence()
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
	turnRight(thisIsGlobal)
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
	thisIsGlobal = 10000
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
	testGlob()
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
	goForward(thisIsGlobal)
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
endfunction
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
function testGlob() returns nothing
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
	number thisIsGlobal
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
	thisIsGlobal = 5
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
endfunction
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
d7cb562e4e24 Initial revision
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30