Elmomc Multi-Axis Motion Controller-Maestro Manuel d'utilisateur Page 71

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 313
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 70
type name
argument-list , type name
type-specifier:
int
float
Examples:
int a,b // declaration global variables
function run() // begin function declaration
global int a // global variable declaration inside body of function
int c // local variable declaration in function run()
c=56
a=b+c // !!!error!!! variable b not declared in this function
a=c+17
end function // end of function declaration
5.2.1.2
Maestro Software Manual MAXL Program Language
MAN-MASSW (Ver. Q)
Array Declarations
An "array declaration" names the array and specifies the type and the number of its
elements. The current release of MAXL supports only global arrays.
Syntax
array-declaration:
type-specifier array-name [define-dimension]
type-specifier:
int
float
define-dimension:
integer-constant
define-dimension , integer-constant
Examples:
int a[10],b[5] // declare global arrays
int xy_positions[100, 2] // declare multi dimensional array
function run() // begin function declaration
global int a[] // global array declaration inside of function
global int xy_positions[100,2]
a[0]=56 // define value of first element
end function // end function declaration
5-9
Vue de la page 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 312 313

Commentaires sur ces manuels

Pas de commentaire