diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-09 21:09:07 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-09 21:09:07 +0000 |
commit | c758c27852f049e021da8855a290dd876e3b7050 (patch) | |
tree | 7404ceb2eea0aa1d17e1e42c115361178a7fb19f | |
parent | a6c8f543276feb112a408d9347b56addd558bd6e (diff) | |
download | open-axiom-c758c27852f049e021da8855a290dd876e3b7050.tar.gz |
More cleanups
-rw-r--r-- | src/interp/br-con.boot | 2 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 6 | ||||
-rw-r--r-- | src/interp/br-search.boot | 4 | ||||
-rw-r--r-- | src/interp/fortcall.boot | 74 | ||||
-rw-r--r-- | src/interp/g-util.boot | 2 | ||||
-rw-r--r-- | src/interp/ht-util.boot | 44 | ||||
-rw-r--r-- | src/interp/i-eval.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 2 | ||||
-rw-r--r-- | src/interp/i-util.boot | 4 | ||||
-rw-r--r-- | src/interp/interop.boot | 4 | ||||
-rw-r--r-- | src/interp/match.boot | 6 | ||||
-rw-r--r-- | src/interp/newfort.boot | 16 | ||||
-rw-r--r-- | src/interp/nrunfast.boot | 10 | ||||
-rw-r--r-- | src/interp/nrungo.boot | 4 | ||||
-rw-r--r-- | src/interp/nrunopt.boot | 2 | ||||
-rw-r--r-- | src/interp/scan.boot | 12 |
16 files changed, 97 insertions, 97 deletions
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 20dd8c25..32e0c9df 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -1309,7 +1309,7 @@ PUT('Enumeration, 'documentation, substitute(MESSAGE, 'MESSAGE, '( mkConArgSublis args == [[arg,:INTERN digits2Names PNAME arg] for arg in args - | (s := PNAME arg) and "or"/[DIGITP ELT(s,i) for i in 0..MAXINDEX s]] + | (s := PNAME arg) and "or"/[DIGITP s.i for i in 0..MAXINDEX s]] digits2Names s == --This is necessary since arguments of conforms CANNOT have digits in TechExplorer diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 403d70ca..6dd77c9e 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -548,8 +548,8 @@ htMakeButtonSaturn(htCommand, message, func,options) == htpAddToPageDescription(htPage, pageDescrip) == newDescript := - string? pageDescrip => [pageDescrip, :ELT(htPage, 7)] - nconc(nreverse COPY_-LIST pageDescrip, ELT(htPage, 7)) + string? pageDescrip => [pageDescrip, :htPage.7] + nconc(nreverse COPY_-LIST pageDescrip, htPage.7) SETELT(htPage, 7, newDescript) @@ -1425,7 +1425,7 @@ htEndTabular() == htSaySaturn '"\end{tabular}" htPopSaturn s == - pageDescription := ELT($saturnPage, 7) + pageDescription := $saturnPage.7 pageDescription is [=s,:b] => SETELT($saturnPage, 7, rest pageDescription) nil diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index 68719adf..6056dd7a 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -283,8 +283,8 @@ mkGrepPattern1(x,:options) == --called by mkGrepPattern (and grepConstructName?) n := SIZE t if startpos < 0 or startpos > n then error "index out of range" k:= startpos - for i in startpos .. n-1 while c ~= ELT(t,i) - or i > startpos and ELT(t,i-1) = '__ repeat (k := k+1) + for i in startpos .. n-1 while c ~= t.i + or i > startpos and t.(i-1) = '__ repeat (k := k+1) k addOptions s == --add front anchor --options a o c d p x denote standard items diff --git a/src/interp/fortcall.boot b/src/interp/fortcall.boot index 9ac32be6..9c2260a1 100644 --- a/src/interp/fortcall.boot +++ b/src/interp/fortcall.boot @@ -50,7 +50,7 @@ makeFort(name,args,decls,results,returnType,aspInfo) == -- and a stub Axiom function to process its arguments. -- the following is a list of objects for which values need not be -- passed by the user. - dummies := [SECOND(u) for u in args | EQUAL(car u,0)] + dummies := [second(u) for u in args | EQUAL(car u,0)] args := [untangle2(u) for u in args] -- lose spad Union representation where untangle2 u == atom (v := rest(u)) => v @@ -114,12 +114,12 @@ writeCFile(name,args,fortranArgs,dummies,decls,results,returnType,asps,fp) == argList := nil for a in args repeat argList := [[a, getCType getFortranType(a,decls)], :argList] - printDec(SECOND first argList,a,asps,fp) + printDec(second first argList,a,asps,fp) argList := nreverse argList; -- read in the data WRITE_-LINE('" xdrstdio__create(&xdrs, stdin, XDR__DECODE);",fp) for a in argList repeat - if LISTP SECOND a then writeMalloc(first a,first SECOND a,rest SECOND a,fp) + if LISTP second a then writeMalloc(first a,first second a,rest second a,fp) not MEMQ(first a,[:dummies,:asps]) => writeXDR(a,'"&xdrs",fp) -- now call the Library routine. FORTRAN names may have an underscore -- appended. @@ -194,7 +194,7 @@ getCType t == error ['"Unrecognised Fortran type: ",t] XDRFun t == - LISTP(ty := SECOND t) => + LISTP(ty := second t) => if first(ty)='"char" then '"wrapstring" else '"array" ty @@ -218,15 +218,15 @@ writeXDR(v,str,fp) == underscore := STRING CHAR('"__:",0) -- to avoid a compiler bug which won't -- parse " ... __" properly. wt(['" CHECK(xdr",underscore, XDRFun(v), '"(", str, '",&", first(v)],fp) - if (LISTP (ty :=SECOND v)) and not EQUAL(first ty,'"char") then + if (LISTP (ty :=second v)) and not EQUAL(first ty,'"char") then wt(['",&",first(v),'"__length,MAX__ARRAY(",first(v),'"__length),"],fp) wt(['"sizeof(",first(ty),'"),xdr",underscore,first ty],fp) wl(['"));"],fp) prefix2Infix(l) == atom(l) => [l] - #l=2 => [first l,"(",:prefix2Infix SECOND l,")"] - #l=3 => ["(",:prefix2Infix SECOND l,first l,:prefix2Infix THIRD l,")"] + #l=2 => [first l,"(",:prefix2Infix second l,")"] + #l=3 => ["(",:prefix2Infix second l,first l,:prefix2Infix third l,")"] error '"Function in array dimensions with more than two arguments" writeMalloc(name,type,dims,fp) == @@ -306,7 +306,7 @@ makeSpadFun(name,userArgs,args,dummies,decls,results,returnType,asps,aspInfo, results := [returnName, :results] argNames := [INTERN strconc(STRINGIMAGE(u),'"__arg") for u in userArgs] aType := [axiomType(a,decls,asps,aspInfo) for a in userArgs] - aspTypes := [SECOND NTH(POSITION(u,userArgs),aType) for u in asps] + aspTypes := [second NTH(POSITION(u,userArgs),aType) for u in asps] nilLst := MAKE_-LIST(#args+1) decPar := [["$elt","Lisp","construct"],:makeLispList decls] fargNames := [INTERN strconc(STRINGIMAGE(u),'"__arg") for u in args | @@ -396,8 +396,8 @@ complexRows z == [:[:pair2list(u.i) for u in z] for i in 0..#(z.0)-1] pair2list u == [car u,cdr u] -vec2Lists1 u == [ELT(u,i) for i in 0..#u-1] -vec2Lists u == [vec2Lists1 ELT(u,i) for i in 0..#u-1] +vec2Lists1 u == [u.i for i in 0..#u-1] +vec2Lists u == [vec2Lists1 u.i for i in 0..#u-1] spad2lisp(u) == -- Turn complexes into arrays of floats @@ -405,7 +405,7 @@ spad2lisp(u) == makeVector([makeVector([second u,CDDR u],"%DoubleFloat")],NIL) -- Turn arrays of complexes into arrays of floats so that tarnsposing -- them puts them in the correct fortran order - first first(u)="Matrix" and first SECOND first(u) = "Complex" => + first first(u)="Matrix" and first second first(u) = "Complex" => makeVector([makeVector(complexRows vec2Lists rest u,"%DoubleFloat")],NIL) rest(u) @@ -420,7 +420,7 @@ invokeFortran(objFile,args,dummies,decls,results,actual) == -- -- cons cell, otherwise a vector. This is to match the internal -- -- representation of an Axiom Record. -- #returnedValues = 1 => returnedValues --- #returnedValues = 2 => [first returnedValues,:SECOND returnedValues] +-- #returnedValues = 2 => [first returnedValues,:second returnedValues] -- makeVector(returnedValues,nil) int2Bool u == @@ -449,20 +449,20 @@ spadify(l,results,decls,names,actual) == -- Result is a Complex Scalar ty in ["double complex" , "complex"] => spadForms := [makeResultRecord(name,ty, _ - [ELT(fort,0),:ELT(fort,1)]),:spadForms] + [fort.0,:fort.1]),:spadForms] -- Result is a Complex vector or array LISTP(ty) and first(ty) in ["double complex" , "complex"] => dims := [getVal(u,names,actual) for u in rest ty] els := nil if #dims=1 then - els := [makeVector([[ELT(fort,2*i),:ELT(fort,2*i+1)] _ + els := [makeVector([[fort.(2*i),:fort.(2*i+1)] _ for i in 0..(first(dims)-1)],nil)] else if #dims=2 then for r in 0..(first(dims) - 1) repeat innerEls := nil - for c in 0..(SECOND(dims) - 1) repeat + for c in 0..(second(dims) - 1) repeat offset := 2*(c*first(dims)+r) - innerEls := [[ELT(fort,offset),:ELT(fort,offset+1)],:innerEls] + innerEls := [[fort.offset,:fort.(offset+1)],:innerEls] els := [makeVector(nreverse innerEls,nil),:els] else error ['"Can't cope with complex output dimensions higher than 2"] @@ -472,15 +472,15 @@ spadify(l,results,decls,names,actual) == LISTP(ty) and first(ty)="logical" and #ty=2 => dim := getVal(second ty,names,actual) spadForms := [makeResultRecord(name,ty,_ - [int2Bool ELT(fort,i) for i in 0..dim-1]), :spadForms] + [int2Bool fort.i for i in 0..dim-1]), :spadForms] LISTP(ty) and first(ty)="logical" => dims := [getVal(u,names,actual) for u in rest ty] els := nil if #dims=2 then for r in 0..(first(dims) - 1) repeat innerEls := nil - for c in 0..(SECOND(dims) - 1) repeat - innerEls := [int2Bool ELT(fort,c*first(dims)+r),:innerEls] + for c in 0..(second(dims) - 1) repeat + innerEls := [int2Bool fort.(c*first(dims)+r),:innerEls] els := [nreverse innerEls,:els] else error ['"Can't cope with logical output dimensions higher than 2"] @@ -493,24 +493,24 @@ spadify(l,results,decls,names,actual) == if MEMQ(0,dims) then els := [[]] else if #dims=1 then - els := [makeVector([ELT(fort,i) for i in 0..(first(dims)-1)],nil)] + els := [makeVector([fort.i for i in 0..(first(dims)-1)],nil)] else if #dims=2 then for r in 0..(first(dims) - 1) repeat innerEls := nil - for c in 0..(SECOND(dims) - 1) repeat - innerEls := [ELT(fort,c*first(dims)+r),:innerEls] + for c in 0..(second(dims) - 1) repeat + innerEls := [fort.(c*first(dims)+r),:innerEls] els := [makeVector(nreverse innerEls,nil),:els] else if #dims=3 then iDim := first(dims) - jDim := SECOND dims - kDim := THIRD dims + jDim := second dims + kDim := third dims for r in 0..(iDim - 1) repeat middleEls := nil for c in 0..(jDim - 1) repeat innerEls := nil for p in 0..(kDim - 1) repeat offset := p*jDim + c*kDim + r - innerEls := [ELT(fort,offset),:innerEls] + innerEls := [fort.offset,:innerEls] middleEls := [makeVector(nreverse innerEls,nil),:middleEls] els := [makeVector(nreverse middleEls,nil),:els] else @@ -596,15 +596,15 @@ prepareResults(results,args,dummies,values,decls) == -- -- order (i.e. swap from C to Fortran order). -- els := nil -- rows := first ARRAY_-DIMENSIONS(u)-1 --- cols := first ARRAY_-DIMENSIONS(ELT(u,0))-1 +-- cols := first ARRAY_-DIMENSIONS(u.0)-1 -- -- Could be a 3D Matrix --- if VECTORP ELT(ELT(u,0),0) then --- planes := first ARRAY_-DIMENSIONS(ELT(ELT(u,0),0))-1 +-- if VECTORP u.0.0 then +-- planes := first ARRAY_-DIMENSIONS(u.0.0)-1 -- for k in 0..planes repeat for j in 0..cols repeat for i in 0..rows repeat --- els := [ELT(ELT(ELT(u,i),j),k),:els] +-- els := [u.i.j.k,:els] -- else -- for j in 0..cols repeat for i in 0..rows repeat --- els := [ELT(ELT(u,i),j),:els] +-- els := [u.i.j,:els] -- makeVector(nreverse els,type) @@ -628,24 +628,24 @@ writeData(tmpFile,indata) == VECTORP v => rows := first ARRAY_-DIMENSIONS(v) -- is it 2d or more (most likely) ? - VECTORP ELT(v,0) => - cols := first ARRAY_-DIMENSIONS(ELT(v,0)) + VECTORP v.0 => + cols := first ARRAY_-DIMENSIONS(v.0) -- is it 3d ? - VECTORP ELT(ELT(v,0),0) => - planes := first ARRAY_-DIMENSIONS(ELT(ELT(v,0),0)) + VECTORP v.0.0 => + planes := first ARRAY_-DIMENSIONS(v.0.0) -- write 3d array xdrWrite(xstr,rows*cols*planes) for k in 0..planes-1 repeat for j in 0..cols-1 repeat for i in 0..rows-1 repeat - xdrWrite(xstr,ELT(ELT(ELT(v,i),j),k)) + xdrWrite(xstr,v.i.j.k) -- write 2d array xdrWrite(xstr,rows*cols) for j in 0..cols-1 repeat - for i in 0..rows-1 repeat xdrWrite(xstr,ELT(ELT(v,i),j)) + for i in 0..rows-1 repeat xdrWrite(xstr,v.i.j) -- write 1d array xdrWrite(xstr,rows) - for i in 0..rows-1 repeat xdrWrite(xstr,ELT(v,i)) + for i in 0..rows-1 repeat xdrWrite(xstr,v.i) -- this is used for lists of booleans apparently in f01 LISTP v => xdrWrite(xstr,LENGTH v) diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 89254289..bd50fd14 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -63,7 +63,7 @@ isSharpVarWithNum x == ok := true c := 0 for i in 1..(n-1) while ok repeat - d := ELT(p,i) + d := p.i ok := DIGITP d => c := 10*c + DIG2FIX d if ok then c else nil diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index a0ea710e..ad02d338 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -57,35 +57,35 @@ htpDestroyPage(pageName) == htpName htPage == -- a symbol whose value is the page - ELT(htPage, 0) + htPage.0 htpSetName(htPage, val) == SETELT(htPage, 0, val) htpDomainConditions htPage == -- List of Domain conditions - ELT(htPage, 1) + htPage.1 htpSetDomainConditions(htPage, val) == SETELT(htPage, 1, val) htpDomainVariableAlist htPage == -- alist of pattern variables and conditions - ELT(htPage, 2) + htPage.2 htpSetDomainVariableAlist(htPage, val) == SETELT(htPage, 2, val) htpDomainPvarSubstList htPage == -- alist of user pattern variables to system vars - ELT(htPage, 3) + htPage.3 htpSetDomainPvarSubstList(htPage, val) == SETELT(htPage, 3, val) htpRadioButtonAlist htPage == -- alist of radio button group names and labels - ELT(htPage, 4) + htPage.4 htpButtonValue(htPage, groupName) == for buttonName in LASSOC(groupName, htpRadioButtonAlist htPage) repeat @@ -97,30 +97,30 @@ htpSetRadioButtonAlist(htPage, val) == htpInputAreaAlist htPage == -- Alist of input-area labels, and default values - ELT(htPage, 5) + htPage.5 htpSetInputAreaAlist(htPage, val) == SETELT(htPage, 5, val) htpAddInputAreaProp(htPage, label, prop) == - SETELT(htPage, 5, [[label, nil, nil, nil, :prop], :ELT(htPage, 5)]) + SETELT(htPage, 5, [[label, nil, nil, nil, :prop], :htPage.5]) htpPropertyList htPage == -- Association list of user-defined properties - ELT(htPage, 6) + htPage.6 htpProperty(htPage, propName) == - LASSOC(propName, ELT(htPage, 6)) + LASSOC(propName, htPage.6) htpSetProperty(htPage, propName, val) == - pair := assoc(propName, ELT(htPage, 6)) + pair := assoc(propName, htPage.6) pair => pair.rest := val - SETELT(htPage, 6, [[propName, :val], :ELT(htPage, 6)]) + SETELT(htPage, 6, [[propName, :val], :htPage.6]) htpLabelInputString(htPage, label) == -- value user typed as input string on page props := LASSOC(label, htpInputAreaAlist htPage) - props and string? (s := ELT(props,0)) => + props and string? (s := props.0) => s = '"" => s trimString s nil @@ -129,9 +129,9 @@ htpLabelFilteredInputString(htPage, label) == -- value user typed as input string on page props := LASSOC(label, htpInputAreaAlist htPage) props => - #props > 5 and ELT(props, 6) => - FUNCALL(SYMBOL_-FUNCTION ELT(props, 6), ELT(props, 0)) - replacePercentByDollar ELT(props, 0) + #props > 5 and props.6 => + FUNCALL(SYMBOL_-FUNCTION props.6, props.0) + replacePercentByDollar props.0 nil replacePercentByDollar s == fn(s,0,MAXINDEX s) where @@ -149,7 +149,7 @@ htpSetLabelInputString(htPage, label, val) == htpLabelSpadValue(htPage, label) == -- Scratchpad value of parsed and evaled inputString, as (type . value) props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 1) + props => props.1 nil htpSetLabelSpadValue(htPage, label, val) == @@ -161,7 +161,7 @@ htpSetLabelSpadValue(htPage, label, val) == htpLabelErrorMsg(htPage, label) == -- error message associated with input area props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 2) + props => props.2 nil htpSetLabelErrorMsg(htPage, label, val) == @@ -173,7 +173,7 @@ htpSetLabelErrorMsg(htPage, label, val) == htpLabelType(htPage, label) == -- either 'string or 'button props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 3) + props => props.3 nil htpLabelDefault(htPage, label) == @@ -184,25 +184,25 @@ htpLabelDefault(htPage, label) == msg props := LASSOC(label, htpInputAreaAlist htPage) props => - ELT(props, 4) + props.4 nil htpLabelSpadType(htPage, label) == -- pattern variable for target domain for input area props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 5) + props => props.5 nil htpLabelFilter(htPage, label) == -- string to string mapping applied to input area strings before parsing props := LASSOC(label, htpInputAreaAlist htPage) - props => ELT(props, 6) + props => props.6 nil htpPageDescription htPage == -- a list of all the commands issued to create the basic-command page - ELT(htPage, 7) + htPage.7 htpSetPageDescription(htPage, pageDescription) == SETELT(htPage, 7, pageDescription) diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index 025d9597..a172534b 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -287,7 +287,7 @@ evalForm(op,opName,argl,mmS) == sideEffectedArg?(t,sig,opName) == opString := SYMBOL_-NAME opName - (opName ~= 'setelt) and (ELT(opString, #opString-1) ~= char '_!) => nil + (opName ~= 'setelt) and (opString.(#opString-1) ~= char '_!) => nil dc := first sig t = dc diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index 82731c18..a0bb9991 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -388,7 +388,7 @@ specialChar(symbol) == -- looks up symbol in $specialCharacterAlist, gets the index -- into the EBCDIC table, and returns the appropriate character null (code := IFCDR ASSQ(symbol,$specialCharacterAlist)) => '"?" - ELT($specialCharacters,code) + $specialCharacters.code rbrkSch() == PNAME specialChar 'rbrk lbrkSch() == PNAME specialChar 'lbrk diff --git a/src/interp/i-util.boot b/src/interp/i-util.boot index c3a5b0ca..2a571c5e 100644 --- a/src/interp/i-util.boot +++ b/src/interp/i-util.boot @@ -129,13 +129,13 @@ Undef(:u) == u':= LAST u [[domain,slot],op,sig]:= u' domain':=eval mkEvalable domain - not EQ(first ELT(domain',slot), function Undef) => + not EQ(first domain'.slot, function Undef) => -- OK - thefunction is now defined [:u'',.]:=u if $reportBottomUpFlag then sayMessage concat ['" Retrospective determination of slot",'%b, slot,'%d,'"of",'%b,:prefix2String domain,'%d] - apply(first ELT(domain',slot),[:u'',rest ELT(domain',slot)]) + apply(first domain'.slot,[:u'',rest domain'.slot]) throwKeyedMsg("S2IF0008",[formatOpSignature(op,sig),domain]) makeInitialModemapFrame() == diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 49156669..4e94b750 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -210,7 +210,7 @@ oldAxiomCategoryLookupExport(catenv, self, op, sig, box, env) == oldAxiomCategoryParentCount([.,.,.,parents,.], env) == LENGTH parents oldAxiomCategoryNthParent([.,.,.,parvec,dom], n, env) == - catform := ELT(parvec, n-1) + catform := parvec.(n-1) VECTORP KAR catform => catform newcat := oldAxiomPreCategoryBuild(catform,dom,nil) SETELT(parvec, n-1, newcat) @@ -404,7 +404,7 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == flag => newLookupInAddChain(op,sig,domain,dollar) nil maxIndex := MAXINDEX numvec - start := ELT(opvec,k) + start := opvec.k finish := QSGREATERP(max,k) => opvec.(QSPLUS(k,2)) maxIndex diff --git a/src/interp/match.boot b/src/interp/match.boot index 37bc2a61..23b0924c 100644 --- a/src/interp/match.boot +++ b/src/interp/match.boot @@ -47,13 +47,13 @@ substring?(part, whole, startpos) == np := SIZE part nw := SIZE whole np > nw - startpos => false - and/[CHAR_-EQUAL(ELT(part, ip), ELT(whole, iw)) + and/[CHAR_-EQUAL(part.ip, whole.iw) for ip in 0..np-1 for iw in startpos.. ] anySubstring?(part,whole,startpos) == np := SIZE part nw := SIZE whole - or/[((k := i) and "and"/[CHAR_-EQUAL(ELT(part, ip),ELT(whole, iw)) + or/[((k := i) and "and"/[CHAR_-EQUAL(part.ip,whole.iw) for ip in 0..np - 1 for iw in i..]) for i in startpos..nw - np] => k charPosition(c,t,startpos) == @@ -61,7 +61,7 @@ charPosition(c,t,startpos) == startpos < 0 or startpos > n => n k:= startpos for i in startpos .. n-1 repeat - c = ELT(t,i) => return nil + c = t.i => return nil k := k+1 k diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index 58e048d3..5e5e01a0 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -126,7 +126,7 @@ exp2Fort2(e,prec,oldOp) == s exp2FortFn(op,args,nargs) op = '"CMPLX" => - ['")",:exp2Fort2(SECOND args, prec, op),'",",:exp2Fort2(first args,prec,op),'"("] + ['")",:exp2Fort2(second args, prec, op),'",",:exp2Fort2(first args,prec,op),'"("] member(op,nonUnaryOps) => if nargs > 0 then arg1 := first args nargs = 1 and member(op, '("+" "*")) => exp2Fort2(arg1,prec,op) @@ -457,11 +457,11 @@ exp2FortSpecial(op,args,nargs) == if LISTP first elts and #elts=1 and first elts is [sOp,:sArgs] then member(sOp, ['"SEGMENT","SEGMENT"]) => #sArgs=1 => fortError1 first elts - not(NUMBERP(first sArgs) and NUMBERP(SECOND sArgs)) => + not(NUMBERP(first sArgs) and NUMBERP(second sArgs)) => fortError("Cannot expand segment: ",first elts) - first sArgs > SECOND sArgs => fortError1 + first sArgs > second sArgs => fortError1 '"Lower bound of segment exceeds upper bound." - for e in first sArgs .. SECOND sArgs for i in si.. repeat + for e in first sArgs .. second sArgs for i in si.. repeat $exprStack := [["=",[var,object2String i],fortPre1(e)],:$exprStack] for e in elts for i in si.. repeat $exprStack := [["=",[var,object2String i],fortPre1(e)],:$exprStack] @@ -796,7 +796,7 @@ fortPre1 e == imags := ['"%i","%i"] member(e, imags) => ['"CMPLX",fortPre1(0),fortPre1(1)] -- other special objects - ELT(STRINGIMAGE e,0) = "%" => SUBSEQ(STRINGIMAGE e,1) + STRINGIMAGE(e).0 = "%" => SUBSEQ(STRINGIMAGE e,1) atom e => e [op, :args] := e member(op,["**" , '"**"]) => @@ -814,7 +814,7 @@ fortPre1 e == INTSIGN PI PI2 INDEFINTEGRAL) op in specialOps => exp2FortSpecial(op,args,#args) member(op,['"*", "*", '"+", "+", '"-", "-"]) and (#args > 2) => - binaryExpr := fortPre1 [op,first args, SECOND args] + binaryExpr := fortPre1 [op,first args, second args] for i in 3..#args repeat binaryExpr := [op,binaryExpr,fortPre1 NTH(i-1,args)] binaryExpr @@ -903,11 +903,11 @@ segment l == for e in l repeat if LISTP(e) and first member(e,["=",'"="]) then var := NTH(1,e) - exprs := segment1(THIRD e, + exprs := segment1(third e, $maximumFortranExpressionLength-1-fortExpSize var) s:= [:[['"=",var,car exprs],:cdr exprs],:s] else if LISTP(e) and first e = '"RETURN" then - exprs := segment1(SECOND e, + exprs := segment1(second e, $maximumFortranExpressionLength-2-fortExpSize first e) s := [:[[first e,car exprs],:cdr exprs],:s] else s:= [e,:s] diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index e684d18d..5ade3ee7 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -185,7 +185,7 @@ newLookupInTable(op,sig,dollar,[domain,opvec],flag) == flag => newLookupInAddChain(op,sig,domain,dollar) nil maxIndex := MAXINDEX numvec - start := ELT(opvec,k) + start := opvec.k finish := QSGREATERP(max,k) => opvec.(QSPLUS(k,2)) maxIndex @@ -364,8 +364,8 @@ newLookupInCategories1(op,sig,dom,dollar) == valueList := [dom,:[dom.(5+i) for i in 1..(# rest dom.0)]] valueList := [MKQ val for val in valueList] nsig := MSUBST(dom.0,dollar.0,sig) - for i in 0..MAXINDEX packageVec | (entry := ELT(packageVec,i)) - and (VECP entry or (predIndex := rest (node := ELT(catVec,i))) and + for i in 0..MAXINDEX packageVec | (entry := packageVec.i) + and (VECP entry or (predIndex := rest (node := catVec.i)) and (EQ(predIndex,0) or testBitVector(predvec,predIndex))) repeat package := VECP entry => @@ -510,7 +510,7 @@ lookupInDomainByName(op,domain,arg) == max := MAXINDEX opvec k := getOpCode(op,opvec,max) or return nil maxIndex := MAXINDEX numvec - start := ELT(opvec,k) + start := opvec.k finish := QSGREATERP(max,k) => opvec.(QSPLUS(k,2)) maxIndex @@ -673,7 +673,7 @@ newHasTest(domform,catOrAtt) == lazyMatchAssocV(x,auxvec,catvec,domain) == --new style slot4 n := MAXINDEX catvec xop := first x - or/[ELT(auxvec,i) for i in 0..n | + or/[auxvec.i for i in 0..n | xop = first (lazyt := QVELT(catvec,i)) and lazyMatch(x,lazyt,domain,domain)] lazyMatchAssocV1(x,vec,domain) == --old style slot4 diff --git a/src/interp/nrungo.boot b/src/interp/nrungo.boot index 9fb108ce..c8ebc7f3 100644 --- a/src/interp/nrungo.boot +++ b/src/interp/nrungo.boot @@ -289,8 +289,8 @@ compareSigEqual(s,t,dollar,domain) == u := t='$ => dollar isSharpVar t => - VECP domain => ELT(rest domain.0,POSN1(t,$FormalMapVariableList)) - ELT(rest domain,POSN1(t,$FormalMapVariableList)) + VECP domain => rest(domain.0).(POSN1(t,$FormalMapVariableList)) + rest(domain).(POSN1(t,$FormalMapVariableList)) string? t and IDENTP s => (s := PNAME s; t) nil s = '$ => compareSigEqual(dollar,u,dollar,domain) diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot index b6209703..57833083 100644 --- a/src/interp/nrunopt.boot +++ b/src/interp/nrunopt.boot @@ -897,7 +897,7 @@ expandType(lazyt,template,domform) == for [.,tag,dom] in argl]] lazyt is ['local,x] => n := POSN1(x,$FormalMapVariableList) - ELT(domform,1 + n) + domform.(1 + n) [functorName,:[expandTypeArgs(a,template,domform) for a in argl]] expandTypeArgs(u,template,domform) == diff --git a/src/interp/scan.boot b/src/interp/scan.boot index b4990d55..b1b29cd0 100644 --- a/src/interp/scan.boot +++ b/src/interp/scan.boot @@ -176,15 +176,15 @@ scanKeyTable:=scanKeyTableCons() scanInsert(s,d) == l := #s h := QENUM(s,0) - u := ELT(d,h) + u := d.h n := #u k:=0 - while l <= #(ELT(u,k)) repeat + while l <= #(u.k) repeat k:=k+1 v := MAKE_-VEC(n+1) - for i in 0..k-1 repeat VEC_-SETELT(v,i,ELT(u,i)) + for i in 0..k-1 repeat VEC_-SETELT(v,i,u.i) VEC_-SETELT(v,k,s) - for i in k..n-1 repeat VEC_-SETELT(v,i+1,ELT(u,i)) + for i in k..n-1 repeat VEC_-SETELT(v,i+1,u.i) VEC_-SETELT(d,h,v) s @@ -695,12 +695,12 @@ subMatch(l,i)==substringMatch(l,scanDict,i) substringMatch (l,d,i)== h:= QENUM(l, i) - u:=ELT(d,h) + u:=d.h ll:=SIZE l done:=false s1:='"" for j in 0.. SIZE u - 1 while not done repeat - s:=ELT(u,j) + s:=u.j ls:=SIZE s done:=if ls+i > ll then false |