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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 52
A-B VBASIC and Visual BASIC
Appendix B
Differences Between
B5
DECLARE FUNCTION GetTime$()
DECLARE SUB SetTime$()
The generic name for declaring a procedures name and its parameters is
prototyping. LXB.EXE creates a prototype for every procedure
encountered whether by the DECLARE statement, the FUNCTION
statement, or the SUB statement.
To allow the user to include files of DECLARE statements without regard to
whether the code for each procedure is also included, LXB will not issue an
error if a procedure is DECLAREd but never defined. Multiple DECLAREs
of the same procedure are permitted but should be identical. Use of a
procedure without its definition will cause an error. Be aware that the
various editors used by Microsoft in their BASICs (QB, QBX, VBDOS,
QBASIC, etc.) usually sort subroutines into alphabetic sequence, which can
ruin any arrangements you may have made to eliminate DECLARE
statements. If prototypes are not present in the source when VBDOS runs a
program, it simply creates them. However, if they are missing when the LIB
compiler is invoked, a compiler error results.
DEFINT letterrange[,letterrange]...
DEFSNG letterrange[,letterrange]...
(DEFDBL letterrange[,letterrange]...)
No longer supported
DEFLNG letterrange[,letterrange]...
DEFSTR letterrange[,letterrange]...
Defines the default type of all variables beginning with the indicated letter
range as either integer, single precision, double precision, long integer, or
string. A-B VBASIC converts any double precision operations to single
precision, so see the details in the General Restrictions section. Generally
it is best to define all variables with the following command at the very
beginning of the program, so that all math operations use the fastest form of
arithmetic processing. Variables which need to be floating point can then be
explicitly typed by using the ! or # trailer.
DEFINT AZ
X! = 123.45 Overrides DEFINT statement!
DIM [SHARED] variable[(subscripts)][AS type]...
Declares a variable and allocates storage space. VBDOS will not allow a
fixed length string (nor an array of them) to be passed to a procedure, neither
will A-B VBASIC. So, as an alternative, use TYPE..END TYPE to define a
variable or array of fixed length strings, and pass it instead.
Vista de pagina 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 83 84

Comentarios a estos manuales

Sin comentarios