diff options
Diffstat (limited to 'src/interp/g-util.boot')
-rw-r--r-- | src/interp/g-util.boot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index f6584a37..dc663fa7 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -94,7 +94,13 @@ homogeneousListToVector(t,l) == ++ tests if x is an identifier beginning with # isSharpVar x == ident? x and stringChar(symbolName x,0) = char "#" - + +++ If `x' is a formal variable, return its numeral position. +++ Otherwise return nil. +formalVarNumber x == + not isSharpVar x => nil + readIntegerIfCan subsString(symbolName x,1) + isSharpVarWithNum x == not isSharpVar x => nil p := symbolName x |