•  Back 
  •  VDI Input 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Filevsin_mode()
vsm_string()
vrq_string()                                                            VDI

Syntax

VOID vrq_string( handle, maxlen, echo, outxy, str )
WORD handle, maxlen, echo;
WORD *outxy;
char *str;

Function      vrq_string() waits for input from the 'string' device in
              request mode.

Opcode        31

Availability  This call is not guaranteed to be available with any driver
              and its use should therefore be restricted.

Parameters    handle specifies a valid workstation handle. This call
              inputs characters from the keyboard into the buffer pointed
              to by str up to maxlen + 1 characters. If echo is set to 1,
              characters are echoed to the screen at the location given by
              the two WORDs pointed to by outxy. If echo is set to 0, no
              echoing is performed.

Binding       WORD i;

              contrl[0] = 31;
              contrl[1] = 1;
              contrl[3] = 2;
              contrl[6] = handle;

              intin[0] = maxlen;
              intin[1] = echo;

              ptsin[0] = outxy[0];
              ptsin[1] = outxy[1];

              vdi();

              for(i = 0;i < contrl[4];i++)
               str[i] = (char)intout[i];

Caveats       The echo parameter is not functional. Character output is
              never echoed. However, outxy must point to valid memory
              space or a crash will occur.

Comments      Though this binding does not allow for it, if maxlen is
              specified as negative, then as many as |maxlen| + 1
              characters will be read as keycodes rather than ASCII codes.
              The values in intout will occupy the full WORD rather than
              just the lower eight bits. A custom binding could be used to
              take advantage of this.

See Also      vsin_mode(), vsm_string()

Group         VDI Input