"Sputnik" help  
Sputnik Help
Language Reference - Preprocessor


In Sputnik the preprocessor is a statement/text substitution system that alters the source file before parsing takes place.

This allows many powerful features and is very much inline with what you would expect from a C like language but goes a bit beyond adding many additional and unconventional features to it's preproessor basically making it into a kind of mini-language.

Preprocessor Macros take are defined and used during the preprocessing phase before the source code is parsed. This is not the same as regular @Macros that take place during execution of the program.

A macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro. There are two kinds of macros. They differ mostly in what they look like when they are used. Object-like macros resemble data objects when used, function-like macros resemble function calls.

You may define any valid identifier as a macro, even if it is a Sputnik keyword. The preprocessor does not know anything about keywords. However, the preprocessor operator defined can never be defined as a macro.

Keep in mind that Sputnik's preprocessor is a sophisticated tool, and mastering it will require time and effort. If you're already familiar with the C preprocessor, your knowledge is a valuable foundation. However, be prepared to explore additional features and nuances unique to Sputnik. The learning journey extends beyond the scope of standard C preprocessing, offering a wealth of capabilities for advanced macro manipulation and customization.

All Preprocessor Features:

Because Sputniks preprocessor works almost the same way the one in C does some of this section (aside from all the new stuff Sputnik introduces for macros) comes from a book about C by Richard M. Stallman, Zachary Weinberg so thanks to him for proving the information is a simple to understand way and allowing people to copy it.

Cheryl (uberfox@hotmail.com)