Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support macro-like defines #19

Open
OmerMor opened this issue Jan 15, 2019 · 0 comments
Open

Feature Request: Support macro-like defines #19

OmerMor opened this issue Jan 15, 2019 · 0 comments

Comments

@OmerMor
Copy link
Contributor

OmerMor commented Jan 15, 2019

The define statements in Sierra's SCI behaved more like c-style macros.

Here's an example from SMOOPER.SC:
(define HEADINGNORTH (or (<= theHeading 45 ) (> theHeading 315)))

Here's Sierra's documentation for define statements:

define:

The define statement allows you to define a symbol which will stand for a
string of text:

 (define symbol lots of text)

will replace symbol, wherever it is encountered as a token, with lots of
text and then continue scanning at the beginning of the replacement text.
Thus, if we write

 (define symbol some text)
 (define some even more)

then

 (symbol)

will become

 (some text)

which then becomes

 (even more text)

Original request from the sciprogramming.com forums:
http://sciprogramming.com/community/index.php?topic=1420.msg12238#msg12238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant