B.2.3 Miscellaneous Functions



next up previous contents
Next: B.3 The Tuple File Up: B.2 The UNFUG Syntax Previous: B.2.2 Conditional Code Generation

B.2.3 Miscellaneous Functions

The rest of the input line will be discarded and not appended to the current output file. This is useful for comments to appear only in a template source file, but not in the UNFUG output filegif.

These statements convert a LISP expression to a string and vice versa. expr-string is useful when the result of a LISP evaluation is not a string, but should show up in the generated code. string-expr produces the opposite effect by converting a string to a LISP expression which does not appear in the UNFUG output.

These statements can be used to enforce certain naming conventions when used e.g. to produce function names. UPCS converts string to uppercase letters, LOCS converts string to lowercase letters, UPCF converts the first letter of string to uppercase, LOCF converts the first letter of string to lowercase, and STRIPL strips the leftmost number characters from string. In most cases, these statements are only simple alias macros to XLISP functions, which have been introduced for convenience.

Just for completeness these statements are mentioned here, although they should not normally be used inside a template source file, since these are LISP functions more or less internal to UNFUG. However, in some rare cases they may be useful, when additional information about a tuple is of concern. ufg::get-tuple retrieves a full tuple specification as a LISP list from the specified tuple-name (or the actual tuple, if not specified). ufg::get-tuple-values retrieves just the tuple values from the requested tuple, and ufg::get-tuple-length returns the length of a tuple, i.e. how many value lists the tuple holds (how often the code loop will be run), when using UseTuple and EndTuple.



next up previous contents
Next: B.3 The Tuple File Up: B.2 The UNFUG Syntax Previous: B.2.2 Conditional Code Generation



Martin Stiftinger
Tue Nov 29 19:41:50 MET 1994