Rockwell-automation 2708-NBD VBASIC Language Development Kit Manual de usuario Pagina 47

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 46
AB
A
Appendix
A1
A-B VBASIC and Visual BASIC Tips
Misspellings
Dont misspell names. BASIC is unforgiving of such errors since it will just
create a new variable which is zero or blank.
Strings in TYPEs
Strings which are defined in TYPE statements are of a fixed length. These
are always blank padded on the end.
Variables Beginning with FN
Do not start any variable name with FN, Fn, Fn, or fn. BASIC treats these as
a reference to the archaic DEF FN.... mechanism and produces a syntax error.
Accidental Omission of %, &, ! # OR $
If you leave the trailing character off of variable names, you will usually get
no warning from BASIC. Instead, the variable will be a different one than
what you expected. Watch out for this! If you happened to pick a
String/Integer mismatch, you will get syntax errors. Integer/Real mismatches
are very difficult to locate.
Another peculiarity of trailing characters is that if you have a function named
XYZ!, and you attempt to reference that function as XYZ# or XYZ% or
anything other than XYZ! or XYZ then you will get a MULTIPLE
DEFINITION error at the function declaration even though the reference is
many lines later.
Use of Colons as Statement Separators
Use of colon : as a statement separator can cause a number of problems
with both Visual BASIC and A-B VBASIC. An example follows:
CL2 : PRINT This is a test ;
Vista de pagina 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 83 84

Comentarios a estos manuales

Sin comentarios