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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 74
Appendix C
Application Library Subroutines
C7
The global MODIFIED% is TRUE when the string was changed in any
way. The strlength is the maximum number of characters to allow in the
string (not including the terminal null). This must be at least fieldlength%
characters long. The return value e is an event code. This is 0 on a normal
return (operator pressed CR). The devices which are active are defined by the
global variable GLOBALMASK% which is in the same format as the
mask% used by % and TestEvent%. The field will start at the current cursor
location. The cursor is left at its starting locationi when ReadStrField exits.
e = ReadStrField%( attr%, fldlen%, strtchar%, string$,
stringlen% )
FUNCTION ReadStrField% ( attr%, flength%, strpos%, s$,
slen% )
ReadStr% Edit a string on the screen.
Thhis is a simplified version of ReadStrField% that does not have as many
parameters. Any attributes should be in the GLOBALATTR% variable.
Dont forget to set GLOBALMASK% to the devices which can terminate the
read. Make sure you include KbdMask. See TestEvent% for more info.
e = ReadStr ( length%, s$ )
FUNCTION ReadStr% ( n%, s$ )
An example of reading from the keyboard is as follows:
e = ReadStr(Length%, s$)
IF e = BadgeEvent THEN
s$ = InBuf$. .
END IF
ReadNumStr% Edit a numeric string on the screen.
The string which is edited may contain only 0 through 9. Any attributes
should be in the GLOBALATTR% variable.
e = ReadNumStr ( length%, s$ )
FUNCTION ReadNumStr% ( n%, s$ )
ReadYN% Wait for a YES/NO response from user.
Returns TRUE or FALSE depending on the users response. EXITKEY% is
set if you really need the event value. Nothing is displayed; this just waits for
Enter, Clear, or a Y or N.
IF ReadYN% ( default% ) THEN . . .
FUNCTION ReadYN% ( defv% )
Vista de pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 83 84

Comentarios a estos manuales

Sin comentarios