FYI from about 11 months it is possible to use nopile mode
and include files in Spad. For example the following
is Spad file using ')nopile parenthesis' mode:
--------------<cut here>---------------------
)nopiles parenthesis
)abbrev package TTT TTT
TTT : with (foo : Integer -> Integer) == add (
foo(x : Integer) : Integer == x
)
--------------<cut here>---------------------
The same, but using ')nopile brace':
--------------<cut here>---------------------
)nopile brace
)abbrev package TTT TTT
TTT : with (foo : Integer -> Integer) == add {
foo(x : Integer) : Integer == x
}
--------------<cut here>---------------------
Note that unlike Aldor nopile mode affects the
whole constructor (trying to change mode inside
will _not_ give expected result).
Also, one can include files using ')include' directive.
For example:
--------------<begine iinc.spad>---------------------
BODY(n) ==> n(x : Integer) : Integer == x
--------------<end iinc.spad>---------------------
--------------<cut here>---------------------
)nopiles parenthesis
)include iinc.spad
)abbrev package TTT TTT
TTT : with (
foo : Integer -> Integer;
bar : Integer -> Integer
) == add (
BODY(foo);
BODY(bar)
)
--------------<cut here>---------------------
Above I again use nopile synax (so I need semicolons to separate
statements) and also I give example of macro with parameters.
Currently ')nopiles' has global effect, so reading or compiling
file may change mode. We probably should make it local to files,
so that after reading or compiling file the old mode should be
restored.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/groups/opt_out.