Simscript III/Dictionnaire des instructions/DEFINE ... FUNCTION

Un livre de Wikilivres.

Cet énoncé, placé dans le preamble, définit les sous-programmes de type function, en précisant le type du résultat fourni et le nombre d’arguments d’entrée. Elle est obligatoire.

Syntaxe :



Exemples :

define IsEnabled        as a nonsimscript GLboolean function with 1 GLenum  argument
define Factorielle      as an integer function with 1 integer argument
define Lancer_Dé_F      as an integer method 				‘‘ méthode fonction
define toShort          as an integer function with 1 1-dim alpha argument
define toHexa           as an integer function with 4 alpha arguments
define mt19937_MP_grnd	  as a real fortran function with 0 argument;