Charm Output Library (out) 

These procedures allow applications to write data to the screen or files. The default output stream is rawvdu: accessed through static member variable vdu. Note that the output procedures may be chained for conciseness e.g.

int n := 10;
Out.vdu.str ("n = ").num (n).nl ();

Open output stream


export dynamic proc 
open (ref array char name) ref Rtl.ErrMsg

  • passed name - stream name
  • returns nil if successful
  1. Error record contains error details if open fails.

Close current output stream


export dynamic proc close ()

 Write buffer


export dynamic proc buf (int block, int length) ref Out
  • passed block - buffer
  •            length - length
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.
  2. Use this method to write binary data to files.

 Write string


export dynamic proc str (ref array char zs) ref Out
  • passed zs - string
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write character

export dynamic proc ch (char ch) ref Out
  • passed ch - character
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

 Write number

export dynamic proc num (int value) ref Out
  • passed value - signed integer
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write number in field

export dynamic proc num_fld (int value, int field_length) ref Out
  • passed value  - signed integer
  •            field_length - field length
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write floating point number

export dynamic proc float (real value) ref Out
  • passed value - real number
  • returns  chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write floating point number in field

export dynamic proc float (real value, int field_length) ref Out
  • passed value - real number
  •            field_length - field length
  • returns  chaining reference
  1. This procedure can be chained with calls to other write procedures.
  2. The shortest possible representation is used.
  3. If a zero or negative length is specified no field length constraint is applied.
  4. Otherwise if the number does not fit in the field * characters are output.

Write hexadecimal byte

export dynamic proc byte (char ch) ref Out
  • passed ch - byte
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write hexadecimal word

export dynamic proc word (int word) ref Out
  • passed word - word
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write hexadecimal long

export dynamic proc long (int long) ref Out
  • passed 1ong - long
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

Write newline

export dynamic proc nl () ref Out
  • returns chaining reference
  1. This procedure can be chained with calls to other write procedures.

   Write message
export proc message (int type, ref array char zm)
  • passed type - message type (MSG_DEBUGMSG_INFOMSG_WARNMSG_ERRORMSG_FATAL)
  •       zm - message
  1. Writes a message to the screen.
   Write debug
ref proc debug (ref array char msg)
  • passed msg - message
  1. Writes a debug message to the screen (same as write message type debug).

Make a Free Website with Yola.