Created
March 15, 2014 21:46
-
-
Save anonymous/9574381 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streams | |
type | |
TGridRow = array[1..6000, uint8] | |
TGridSquare = array[1..6000, TGridRow] | |
proc test(a:uint16, gs:TGridSquare):seq[uint16] = | |
echo($a) | |
result = @[] | |
result.add(a) | |
result.add(12) | |
return | |
var fs = newFileStream("e135s35",fmRead) | |
let numRow = readInt16(fs) | |
let numCol = readInt16(fs) | |
echo($numRow) | |
echo($numCol) | |
gs : TGridSquare | |
# I will be loading the array after processing the file | |
# but just want to test the parameter passing syntax | |
let ans:seq[uint16] = test(69,gs) | |
echo(ans.len) | |
echo(ans[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment