FortranCode

fortran.spad line 66 [edit on github]

This domain builds representations of program code segments for use with the FortranProgram domain.

=: (%, %) -> Boolean

from BasicType

~=: (%, %) -> Boolean

from BasicType

assign: (Symbol, Expression Complex Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Expression Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Expression Integer) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Expression MachineComplex) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Expression MachineFloat) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Expression MachineInteger) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, List Polynomial Integer, Expression Complex Float) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, List Polynomial Integer, Expression Float) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, List Polynomial Integer, Expression Integer) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, List Polynomial Integer, Expression MachineComplex) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, List Polynomial Integer, Expression MachineFloat) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, List Polynomial Integer, Expression MachineInteger) -> %

assign(x, l, y) creates a representation of the assignment of y to the l'th element of array x (l is a list of indices).

assign: (Symbol, Matrix Expression Complex Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix Expression Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix Expression Integer) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix Expression MachineComplex) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix Expression MachineFloat) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix Expression MachineInteger) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix MachineComplex) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix MachineFloat) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Matrix MachineInteger) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, String) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression Complex Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression Float) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression Integer) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression MachineComplex) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression MachineFloat) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector Expression MachineInteger) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector MachineComplex) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector MachineFloat) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

assign: (Symbol, Vector MachineInteger) -> %

assign(x, y) creates a representation of the FORTRAN expression x=y.

block: List % -> %

block(l) creates a representation of the statements in l as a block.

call: String -> %

call(s) creates a representation of a FORTRAN CALL statement

code: % -> Union(nullBranch: null, assignmentBranch: Record(var: Symbol, arrayIndex: List Polynomial Integer, rand: Record(ints2Floats?: Boolean, expr: OutputForm)), arrayAssignmentBranch: Record(var: Symbol, rand: OutputForm, ints2Floats?: Boolean), conditionalBranch: Record(switch: Switch, thenClause: %, elseClause: %), returnBranch: Record(empty?: Boolean, value: Record(ints2Floats?: Boolean, expr: OutputForm)), blockBranch: List %, commentBranch: List String, callBranch: String, forBranch: Record(range: SegmentBinding Polynomial Integer, span: Polynomial Integer, body: %), labelBranch: SingleInteger, loopBranch: Record(switch: Switch, body: %), commonBranch: Record(name: Symbol, contents: List Symbol), printBranch: List OutputForm)

code(f) returns the internal representation of the object represented by f.

coerce: % -> OutputForm

coerce(f) returns an object of type OutputForm.

comment: List String -> %

comment(s) creates a representation of the Strings s as a multi-line FORTRAN comment.

comment: String -> %

comment(s) creates a representation of the String s as a single FORTRAN comment.

common: (Symbol, List Symbol) -> %

common(name, contents) creates a representation a named common block.

cond: (Switch, %) -> %

cond(s, e) creates a representation of the FORTRAN expression IF (s) THEN e.

cond: (Switch, %, %) -> %

cond(s, e, f) creates a representation of the FORTRAN expression IF (s) THEN e ELSE f.

continue: SingleInteger -> %

continue(l) creates a representation of a FORTRAN CONTINUE labelled with l

forLoop: (SegmentBinding Polynomial Integer, %) -> %

forLoop(i=1..10, c) creates a representation of a FORTRAN DO loop with i ranging over the values 1 to 10.

forLoop: (SegmentBinding Polynomial Integer, Polynomial Integer, %) -> %

forLoop(i=1..10, n, c) creates a representation of a FORTRAN DO loop with i ranging over the values 1 to 10 by n.

getCode: % -> List String

getCode(f) returns a list of strings representing f in Fortran notation. This is used by the FortranProgram domain.

gotoJump: SingleInteger -> %

gotoJump(l) creates a representation of a FORTRAN GOTO statement

latex: % -> String

from SetCategory

operation: % -> Union(Null: null, Assignment: assignment, Conditional: conditional, Return: return, Block: block, Comment: comment, Call: call, For: for, While: while, Repeat: repeat, Goto: goto, Continue: continue, ArrayAssignment: arrayAssignment, Save: save, Stop: stop, Common: common, Print: print)

operation(f) returns the name of the operation represented by f.

printCode: % -> Void

printCode(f) prints out f in FORTRAN notation.

printStatement: List OutputForm -> %

printStatement(l) creates a representation of a PRINT statement.

repeatUntilLoop: (Switch, %) -> %

repeatUntilLoop(s, c) creates a repeat … until loop in FORTRAN.

returns: () -> %

returns() creates a representation of a FORTRAN RETURN statement.

returns: Expression Complex Float -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

returns: Expression Float -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

returns: Expression Integer -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

returns: Expression MachineComplex -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

returns: Expression MachineFloat -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

returns: Expression MachineInteger -> %

returns(e) creates a representation of a FORTRAN RETURN statement with a returned value.

save: () -> %

save() creates a representation of a SAVE statement.

setLabelValue: SingleInteger -> SingleInteger

setLabelValue(i) resets the counter which produces labels to i

stop: () -> %

stop() creates a representation of a STOP statement.

whileLoop: (Switch, %) -> %

whileLoop(s, c) creates a while loop in FORTRAN.

BasicType

CoercibleTo OutputForm

SetCategory