Term Functions

All terminal related functions are mapped on the Term table. These functions are used to print string to the console or the get input from the user.

  • Term.CTLine(character, txt, style)
  • Term.Input(t, wordwrap, linefeed)
  • Term.Line(character, style)
  • Term.Print(t, wordwrap, newlineoffset, linefeed, getdata)
  • Term.TEST()


Term.CTLine(character, txt, style)

Term.CTLine(character, txt, style)

Draw a line with the given <character> and center on it the given <txt> text with the specified <style>.

INPUT

  • character : Character used to draw the line
  • txt : Text to center
  • style : Character style


Term.Input(t, wordwrap, linefeed)

result = Term.Input(t, wordwrap, linefeed)

Prompt the user with a message.

INPUT

  • t : Message for the user
  • wordwrap : TRUE to enable the wordwrap
  • linefeed : TRUE to add a line feed at the end of the message

OUTPUT

  • result : User's answer


Term.Line(character, style)

Term.Line(character, style)

Draw a line with the <character> line and the given <style>.

INPUT

  • character : Character used to draw the line
  • style : Character style


Term.Print(t, wordwrap, newlineoffset, linefeed, getdata)

Term.Print(t, wordwrap, newlineoffset, linefeed, getdata)

Print a string to the terminal.

INPUT

  • t : Message to print
  • wordwrap : TRUE to enable wordwrap (default=True)
  • newlineoffset : Offset to the right when a newline occurs (default=0)
  • linefeed : TRUE to add a final linefeed (default=True)
  • getdata : INTERNAL : Used by the input routine


Term.TEST()

Term.TEST()

Perform a test to check ANSI capabilities of the host console, more informations here.

hollywoodlibs/ansi/termfunctions.txt · Ultima modifica: 2016/10/10 21:15 da admin
CC Attribution-Noncommercial 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0