CONSOLE
Updated: July 4, 2006

Console (CONSOLE numeric arguments are non-floating integer values)
~~~~~~~
CLS clears screen.

COLOR foreground[, background]; "normal" is COLOR 7,0

  COLOR 14  'change foreground (text); leave background unchanged

FREECONSOLE  (see Miscellaneous section)

INPUT [prompt_string;] var1[, var2, var3, etc]

  Prints prompt_string, if any, which may be any string expression.  Then
  INPUT assigns the user's keyboard input line to one or more dimensioned
  variables.  If more than one variable is listed, the input line is parsed
  as a comma-delimited list.  The variables may be any type, including array
  elements or type members, either string or numeric (similar to the READ
  statement).

  =====hotinput.bas
  $APPTYPE CONSOLE
  dim i as long, j as long, a$ as string
  input "prompt "; i, j, a$
  print i; tab; j; tab; a$
  PAUSE
  =====hotinput.bas

LOCATE line, column; positions cursor at 1-based line/column.

  LOCATE 1,1  'locate in upper-left position

PAUSE prints a prompt and waits for user key press.

PRINT number | string[; number | string[; etc]]

  PRINT i; comma; j; comma, a$
  PRINT i;  'prints with no crlf
  PRINT i   'print i and crlf

SETCONSOLEMODE mode; mode is valid w32 SetConsoleMode API mode: 

  $DEFINE ENABLE_PROCESSED_INPUT    &H1
  $DEFINE ENABLE_LINE_INPUT         &H2
  $DEFINE ENABLE_ECHO_INPUT         &H4
  $DEFINE ENABLE_WINDOW_INPUT       &H8
  $DEFINE ENABLE_MOUSE_INPUT       &H10

  SETCONSOLEMODE 7  'enable ctrl-c, line input and echo

SETCONSOLETITLE string; string is application title bar text.

  Note: same as Application.Title = string

SHOWCONSOLE

  No arguments.  Used to create a fully functional new console window.
  For debugging, SHOWCONSOLE can be useful in CGI and GUI applications.

Please see the Objects > CONSOLE for more properties and methods.


+ Penthouse (registered) version

Copyright 2003-2006 James J Keene PhD
Original Publication: Oct 8, 2003
