Denso Power Net Terminal BHT-7500 Spécifications Page 78

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 560
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 77
Chapter 5. Data Types
69
5.1 Constants
5.1.1 Types of Constants
A constant is a data item whose value does not change during program execution. Constants
are classified into two types: string constants and numeric constants.
[ 1 ] String Constants
A "string constant" is a character string enclosed with a pair of double quotation marks ("). Its
length should be a maximum of 255 characters.
The character string should not contain a double quotation mark (") or any control codes.
[ 2 ] Numeric Constants
Integer Constants
In decimal notation
An integer constant in decimals is usually followed by a percent sign (%) as shown
below, but the % can be omitted.
Syntax:
sign decimalnumericstring%
Where the sign is either a plus (+) or a minus (). The plus sign can be omitted.
The valid range is from -32768 to 32767.
If included in an integer constant in decimals, a comma (,) for marking every three digits
will cause a syntax error.
In hexadecimal notation
Integer constants in hexadecimals should be formatted as shown below.
Syntax:
&Hhexnumericstring
The valid range is from 0h to FFFFh.
If included in a numeric string in hexadecimals, a period denoting a decimal point will
cause a syntax error.
Constant Example
String constants
"ABC", "123"
Numeric constants Integer constants
Real constants
In decimal notation
In hexadecimal notation
123%, -4567
&HFFF, &h1A2B
123.45, -67.8E3
Vue de la page 77
1 2 ... 73 74 75 76 77 78 79 80 81 82 83 ... 559 560

Commentaires sur ces manuels

Pas de commentaire