Browse files

Removed args from Lobby (and therefor Object) and moved all calls to …

…System args
  • Loading branch information...
1 parent 1953294 commit 14cae4e1b4e2ff48b7f8530dba3dae89607d1004 @cdmoyer cdmoyer committed with Steve Dekorte Jan 9, 2008
View
2 addons/DBI/samples/benchmark.io
@@ -1,6 +1,6 @@
#!/usr/bin/env io
-recCount := if(args at(1), args at(1) asNumber, 50000)
+recCount := if(System args at(1), System args at(1) asNumber, 50000)
c := DBI with("sqlite3")
c optionPut("dbname", "test.db")
View
2 addons/Flux/samples/Slideshow/main.io
@@ -105,7 +105,7 @@ Slideshow := GLApp clone do(
specialDownKey := method(slideNumber = (slideNumber + 1) min(slides size - 1))
)
-//Slideshow open(if(args size > 0, args at(1), "slides.txt"))
+//Slideshow open(if(System args size > 0, System args at(1), "slides.txt"))
path := Path with(launchPath, "slides.txt")
Slideshow open(path)
View
2 addons/Font/samples/slides.io
@@ -104,4 +104,4 @@ Slideshow := GLApp clone do(
specialDownKey := method(slideNumber = ((slideNumber + 1) min(slides size - 1)))
)
-Slideshow open(args at(0))
+Slideshow open(System args at(0))
View
1 addons/Image/samples/scale.io
@@ -3,6 +3,7 @@
App := Object clone do(
display := method(
+ args := System args
e := try(
inFile := args at(0)
outFile := args at(1)
View
2 addons/Loki/samples/shootout/fasta.io
@@ -49,7 +49,7 @@ Fasta := Object clone do(
)
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
">ONE Homo sapiens alu" println
Fasta repeat(2*n, ALU)
View
2 addons/Loki/samples/shootout/nsieve-bits.io
@@ -25,7 +25,7 @@ sieve := Object clone do(
)
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
sieve show(10000 shiftLeft(n))
sieve show(10000 shiftLeft(n-1))
sieve show(10000 shiftLeft(n-2))
View
2 addons/Loki/samples/shootout/nsieve.io
@@ -26,7 +26,7 @@ nsieve := method(n,
writeln("Primes up to", n asString alignRight(9, " "), cnt asString alignRight(9, " "))
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
nsieve( (2^n)*10000 )
nsieve( (2^(n-1))*10000 )
nsieve( (2^(n-2))*10000 )
View
4 addons/Loki/samples/shootout/old_nsieve.io
@@ -31,12 +31,12 @@ Object clone do(
)
clk := chrono(
- //n := args at(1) asNumber
+ //n := System args at(1) asNumber
nsieve( (2**(n))*10000 )
nsieve( (2**(n-1))*10000 )
nsieve( (2**(n-2))*10000 )
)
"#{clk / (2* (10 **(9)))} sec" interpolate println
)
-"ok."
+"ok."
View
4 addons/MD5/samples/md5.io
@@ -13,12 +13,12 @@ File md5String := method(
digest md5String
)
-if (?args == nil or args size == 0,
+if (System ?args == nil or System args size == 0,
write("requires a file name as an argument\n")
exit
)
-f := File clone setPath(args at(0))
+f := File clone setPath(System args at(0))
m1 := f md5String
m2 := f asBuffer md5String
write("md5 = ", m1, "\n")
View
4 addons/OpenGL/samples/game/client.io
@@ -123,8 +123,8 @@ GameClient update := method(id, x, y, angle,
ServerConnection := Object clone
ServerConnection setDelegate := method(d, self delegate := d; self)
ServerConnection setup := method(
- ip := if(args at(0), args at(0), "67.118.104.220")
- port := if(args at(1), args at(1), 8888)
+ ip := if(System args at(0), System args at(0), "67.118.104.220")
+ port := if(System args at(1), System args at(1), 8888)
self socket := Socket clone setHost(ip) setPort(port) connect
if (socket == nil, write("Unable to connect to ", ip, " on port ", port, "\n"); exit)
)
View
2 addons/Socket/samples/Google.io
@@ -30,7 +30,7 @@ GoogleSearch := Object clone do(
)
)
-GoogleSearch clone find(args at(1)) links foreach(println)
+GoogleSearch clone find(System args at(1)) links foreach(println)
while(Coroutine yieldingCoros size > 1, yield)
View
4 addons/Socket/samples/WebDownload.io
@@ -4,8 +4,8 @@
// ./ioServer Sockets/_tests/WebDownload.io http://64.236.34.161:80/stream/1018 GrooveSalad.mp3
//doFile(launchPath .. "/URL.io")
-url := args at(0)
-fileName := args at(1)
+url := System args at(0)
+fileName := System args at(1)
//DNSResolver addServerAddress("128.105.2.10")
View
2 addons/Socket/samples/WebServer/test.io
@@ -4,7 +4,7 @@
SocketManager setSelectTimeout(0.0)
Scheduler setSleepInterval(0)
-requestCount := if(args at(0), args at(0) asNumber, 10000)
+requestCount := if(System args at(0), System args at(0) asNumber, 10000)
t1 := Date clone now
lastChunkTime := Date clone now
View
2 addons/SoundTouch/samples/sndplay.io
@@ -1,7 +1,7 @@
#!/usr/bin/env io
/*
-if (?args == nil,
+if (System ?args == nil,
write("requires name of sound file as argument")
)
*/
View
1 build.io
@@ -8,6 +8,7 @@ Directory fileNamedOrNil := method(path,
Directory setCurrentWorkingDirectory(launchPath)
project := Project clone
+args := System args clone
if(args at(1) == "-a") then(
project buildAddon(args at(2))
) elseif (args at(1)) then(
View
3 libs/iovm/io/A2_Object.io
@@ -286,7 +286,6 @@ Object do(
launchFile := method(path, args,
args ifNil(args = List clone)
- Lobby args := args
Lobby launchPath := path pathComponent
Directory setCurrentWorkingDirectory(Lobby launchPath)
System launchScript = path
@@ -480,5 +479,3 @@ Object do(
"Evaluates the File in the context of the receiver. Returns the result. pathString is relative to the file calling doRelativeFile. (Duplicate of doRelativeFile)")
relativeDoFile := getSlot("doRelativeFile")
)
-
-Lobby args := method(System args)
View
14 libs/iovm/io/Z_CLI.io
@@ -59,23 +59,23 @@ CLI := Object clone do(
runIorc
- if(?args first == "-e",
- writeln(context doString(args slice(1) map(asUTF8) join(" ")))
+ if(System ?args first == "-e",
+ writeln(context doString(System args slice(1) map(asUTF8) join(" ")))
return
)
- if(?args and args size > 0,
+ if(System ?args and System args size > 0,
- if(args first == "-i",
- if(args size >= 2,
- runFile(args at(1))
+ if(System args first == "-i",
+ if(System args size >= 2,
+ runFile(System args at(1))
,
if(File clone setPath("main.io") exists, runFile("main.io"))
)
return interactiveMultiline
)
- runFile(args first)
+ runFile(System args first)
,
if(File clone setPath("main.io") exists,
runFile("main.io")
View
1 libs/iovm/tests/UnicodeTest-helper/printer.io
@@ -2,6 +2,7 @@
Importer addSearchPath(Path with(method(call message label pathComponent) call, ".."))
+args := System
if(args at(1) == "--print",
UnicodeTest getSlot(args at(2)) print
exit
View
4 libs/iovm/tests/run.io
@@ -3,12 +3,12 @@
//Message useIoShuffle
//Collector debugOn
-if(args size > 1,
+if(System args size > 1,
# Run specific tests
UnitTest verbose := getSlot("writeln")
time := Date clone cpuSecondsToRun(
- args slice(1) foreach(name,
+ System args slice(1) foreach(name,
writeln(name, ":")
try(
if(name endsWithSeq(".io"),
View
2 samples/misc/CommandLineArgs.io
@@ -3,4 +3,4 @@
// ./io CommandLineArgs.io a b c d
writeln("Command line arguments:")
-args foreach(println)
+System args foreach(println)
View
2 samples/misc/MainFile.io
@@ -7,7 +7,7 @@ if(isLaunchScript,
writeln("System launchPath: ", System launchPath)
writeln("System launchScript: ", System launchScript)
- writeln("args: ", args)
+ writeln("System args: ", System args)
,
# Loaded using doFile("MainFile.io")
writeln("Was included from another file")
View
2 samples/shootout/binarytrees.io
@@ -20,7 +20,7 @@ TreeNode := Object clone do(
)
minDepth := 4
-maxDepth := args at(1) asNumber max(minDepth+2)
+maxDepth := System args at(1) asNumber max(minDepth+2)
check := TreeNode clone bottomUpTree(0, maxDepth+1) itemCheck
writeln("stretch tree of depth ", maxDepth+1, "\t check: ", check)
View
2 samples/shootout/chameneos.io
@@ -5,7 +5,7 @@
Contributed by Gavin Harrison */
-n := args at(1) asNumber
+n := System args at(1) asNumber
meetings := 0
first := second := Nil
View
12 samples/shootout/cheapconcurrency.io
@@ -4,7 +4,7 @@
http://shootout.alioth.debian.org
Contributed by Gavin Harrison */
-times := args at(1) asNumber
+times := System args at(1) asNumber
Coroutine setStackSize(30000)
@@ -25,14 +25,14 @@ last := nil
)
first := t
-args at(1) asNumber repeat(first @@foo(0))
+System args at(1) asNumber repeat(first @@foo(0))
while(Coroutine yieldingCoros size > 0, yield)
writeln(sum)
/*
-times := args at(1) asNumber
+times := System args at(1) asNumber
sum := 0
@@ -71,13 +71,13 @@ mainCoro := Coroutine currentCoroutine
//Collector setDebug(true)
first := t
-args at(1) asNumber repeat(first receive(0))
+System args at(1) asNumber repeat(first receive(0))
writeln(sum)
*/
/*
-times := args at(1) asNumber
+times := System args at(1) asNumber
sum := 0
n := 0
@@ -93,7 +93,7 @@ send := method(
)
mainCoro := Coroutine currentCoroutine
-iters := args at(1) asNumber
+iters := System args at(1) asNumber
for(i, 1, iters,
n = 500
send
View
2 samples/shootout/fannkuch.io
@@ -43,6 +43,6 @@ fannkuch := method(n,
)
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
f := fannkuch(n)
writeln("Pfannkuchen(", n, ") = ", f)
View
2 samples/shootout/fasta.io
@@ -55,7 +55,7 @@ Fasta := Object clone do(
)
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
">ONE Homo sapiens alu" println
Fasta repeat(2*n, ALU)
View
2 samples/shootout/mandelbrot.io
@@ -88,5 +88,5 @@ MandelbrotSet := Object clone do(
)
)
-MandelbrotSet dim := args at(1) asNumber
+MandelbrotSet dim := System args at(1) asNumber
MandelbrotSet do( calc; printSet )
View
2 samples/shootout/nbody.io
@@ -105,6 +105,6 @@ Sim := Object clone do(
//Collector setDebug(true)
Sim energy asString(0,17) println
-Sim advance(args at(1) asNumber, 0.01)
+Sim advance(System args at(1) asNumber, 0.01)
Sim energy asString(0,9) println
View
2 samples/shootout/nsieve.io
@@ -28,7 +28,7 @@ nsieve := method(n,
writeln("Primes up to", n asString alignRight(9, " "), cnt asString alignRight(9, " "))
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
nsieve( (2^n)*10000 )
nsieve( (2^(n-1))*10000 )
nsieve( (2^(n-2))*10000 )
View
2 samples/shootout/nsievebits.io
@@ -27,7 +27,7 @@ sieve := Object clone do(
)
)
-n := args at(1) asNumber
+n := System args at(1) asNumber
sieve show(10000 shiftLeft(n))
sieve show(10000 shiftLeft(n-1))
sieve show(10000 shiftLeft(n-2))
View
2 samples/shootout/partialsums.io
@@ -9,7 +9,7 @@
/* Contributed by Anthony Borla */
/* ------------------------------------------------------------------ */
-n := args at(1) asNumber
+n := System args at(1) asNumber
s0 := 0 ; s1 := 0 ; s2 := 0 ; s3 := 0 ; s4 := 0 ; s5 := 0 ; s6 := 0
s7 := 0 ; s8 := 0 ; d2 := 0 ; d3 := 0 ; ds := 0 ; dc := 0 ; alt := 1
View
2 samples/shootout/recursive.io
@@ -47,7 +47,7 @@ tak := method(x, y, z,
/* ----------------------------- */
-n := args at(1) asNumber
+n := System args at(1) asNumber
// Use interpolation for complex string expressions
"Ack(3,#io{n}): #io{ack(3, n)}" interpolate println
View
2 samples/shootout/spectral-norm.io
@@ -29,5 +29,5 @@ SNorm:=Object clone do(
n repeatTimes(u append(0))
MAv(n,v,u)
MAtv(n,u,AtAv)))
-n:=args at(1) asNumber
+n:= System args at(1) asNumber
SNorm App(n) asString(0,9) println
View
4 tools/io/DocsExtractor.io
@@ -50,8 +50,8 @@ DocsExtractor := Object clone do(
)
de := DocsExtractor clone
-de setPath(args at(1))
-if(args at(3) == "clean", de clean, de extract)
+de setPath(System args at(1))
+if(System args at(3) == "clean", de clean, de extract)

0 comments on commit 14cae4e

Please sign in to comment.