Betascript Publishing CRiSP File Editor 6 Uživatelský manuál Strana 27

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 92
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 26
Page 27
list l = {
"Item-1", {1, 2, 3},
"Item-2", "hello mum",
"Item-3", 3.14159, /* Trailing comma optional */
};
{button See Also, ALink(crunch,,,)}
Function definitions
A function definition has the form:
[storage_class_specifier] [type_specifier] function_name
( [arg_list] )
{
function_body
}
The storage_class_specifier is currently ignored, although a future version of the language will be able to
understand the static class specifier. The type_specifier is used to indicate the return type of the function.
This is currently ignored.
The argument list should be specified in the ANSI-C format, specifying the type specifiers and optional
names. In addition, crunch supports the syntax:
~ type_specifier [name]
which acts as a place holder for an optional argument or an argument which is to be handled with different
semantics from the standard C-style.
Crunch also supports the ellipsis (...) to indicate that optional further arguments may be specified.
Please note that crunch does not currently check function calls against prototypes.
{button See Also, ALink(crunch,,,)}
Loading a macro: main, _init
As explained below, global variables may be initialised with non-constant expressions, unlike C which is
limited to a constant expression. Because of this facility, CRiSP provides a mechanism for ensuring that
these global variables are initialised before the macros execute. All global variable definitions and initializors
are compiled into a function called _init. When a compiled macro file is loaded (the .cm file), this macro is
executed first. Programmers can put their own one-time initialisation code in the function main(). All the
code in main() is executed within the context of the function _init after the global initialisations. To
understand this better, it is best to compile your code with the -c switch and look at the lisp code that the
compiler generates.
{button See Also, ALink(crunch,,,)}
Expressions
The following table summarises the operator precedence and associativity of the primitive elements of an
expression. This table is a copy of the table which can be found by executing the hier macro at the
command line prompt:
Arity Operator Assoc
--------------------------------------------------------------
binary () [] -> . l -> r
unary ! ~ ++ -- - (type) * & sizeof r -> l
binary * / % l -> r
binary + - l -> r
binary << >> l -> r
binary < <= > >= l -> r
binary == != l -> r
binary & l -> r
binary ^ l -> r
Zobrazit stránku 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 91 92

Komentáře k této Příručce

Žádné komentáře

Pach-and-company manuales

La lista de dispositivos de Pach-and-company contiene 59 manuales de usuario y guías para 59 modelos en 3 tipo de dispositivos

Accesorios de comunicación
Modelos Tipo de documento
Quantum SK1000 Manual de usuario   Pach and Company Quantum SK1000 User Manual, 2 paginas
AeGIS 7000 Series Manual Manual de usuario   Pach and Company AeGIS 7000 Series Manual User Manual, 33 paginas
AeGIS NPB9000 Series Software manual Manual de usuario   Pach and Company AeGIS NPB9000 Series Software manual User Manual, 25 paginas
Quantum QR Series QR4-QR4FF Quick Guide Manual de usuario   Pach and Company Quantum QR Series QR4-QR4FF Quick Guide User Manual, 2 paginas
AeGIS 4000P Manual Manual de usuario   Pach and Company AeGIS 4000P Manual User Manual [it] , 36 paginas
Hardware
Modelos Tipo de documento
ADIR Manual de usuario   Pach and Company ADIR User Manual [en] [de] [fr] [it] , 1 paginas
USP1 Manual de usuario   Pach and Company USP1 User Manual, 1 paginas
ARFR Manual de usuario   Pach and Company ARFR User Manual [en] [de] [es] [fr] [it] , 1 paginas
UCRM Manual de usuario   Pach and Company UCRM User Manual [de] [it] , 2 paginas
SMARTCELL Manual de usuario   Pach and Company SMARTCELL User Manual, 10 paginas