Goto main content

define

This is used to define a constant to the compiler.

DEFINE

NAME

define - This is used to define a constant to the compiler.

SYNOPSIS

%define id value

DESCRIPTION

This is used to define a constant ID. The value can be an integer, a float, a string or a boolean. The ID is the name of the constant while the second argument is its value.

A definition in a package can be used with the package name as in package_name::definition form version 5.112.

Also the definition will define outside of the packager for older program using this feature but this is deprecated.

RETURN

None.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{
        %define A 1234;
        %define B "1234";
        %define C 1234.0;
        %define D true;
        "A="; A; " B="; B; " C="; C;
        ' A,B,C='; A+B+C;
        d=A+B+C;
        ' d='; d;
        a=C; a.type();
        D;

        }}. return

res=A=1234 B=1234 C=1234 A,B,C=3702 d=3702floattrue.));

res={_{
%include "/includes/extenso.sn";
GEXECUTE;
        }}. return
res=16.

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.