User Tools

Site Tools


mpl_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mpl_functions [2016/07/18 08:17] – [Function INPUT (Field: Byte, Max: Byte, Mode: Byte, Default: string) : String] gryphonmpl_functions [2016/07/18 08:38] (current) – [Function DATEJ2G (LI : LongInt) : String] gryphon
Line 65: Line 65:
  
 This function takes a julian date format and converts it to a gregorian format (MMDDYY). This function takes a julian date format and converts it to a gregorian format (MMDDYY).
 +==== Procedure GOTOXY (X: Byte, Y:Byte) ====
 +
 +This procedure will move the cursor to a specified X and Y position on the screen.  This only works for users who have ANSI graphics.
 +
 +Example:
 +<code>
 +CLRSCR
 +GotoXY (1, 10)
 +WriteLn ('Hello')
 +</code>
 +The above example will clear the screen then goto the first column of the tenth line and output the text "Hello" to the screen.
 +
 +
 +==== Procedure HALT ====
 +
 +This procedure will exit the program and return the user back to the BBS immediately.
 +
 +Example:
 +<code>
 +If Graphics = 0 Do
 +Begin
 +  WriteLn ('Sorry, you do not have ANSI graphics.')
 +  Halt
 +End
 +</code>
 +The above example will check to see if the user has ANSI graphics and if not, display "Sorry, you do not have ANSI" and exit the program immediately by using the HALT command.
 +
 +==== Function INITIALS (String) : String ====
 +
 +This function takes a user name and attempts to return one or two character initials.
 +<code>
 + S := Initials('Jack Phlash'); // should return "JP"
 +</code>
  
 ==== Function INPUT (Field: Byte, Max: Byte, Mode: Byte, Default: string) : String ==== ==== Function INPUT (Field: Byte, Max: Byte, Mode: Byte, Default: string) : String ====
Line 80: Line 113:
 |3|Proper input.|Allows all characters, but will convert the first letter in each word to an upper case letter.| |3|Proper input.|Allows all characters, but will convert the first letter in each word to an upper case letter.|
 |4|Phone input.|Allows only numbers and will pre-format them using the USA-style phone numbers.  IE: XXX-XXX-XXXX. Note that the length of this input should always be 12, as that is the length of the USA phone number format.| |4|Phone input.|Allows only numbers and will pre-format them using the USA-style phone numbers.  IE: XXX-XXX-XXXX. Note that the length of this input should always be 12, as that is the length of the USA phone number format.|
-|5|Date input.  Allows only numbers and will pre-format them using the date format (ie XX/XX/XX) that is currently selected by the user.  NOTE: The date input will always return the date in the MM/DD/YY format, regardless of what format the user has selected.  For example, if the user has selected the DD/MM/YY format, Input will expect the   user to enter the date in that format, but will then convert it to MM/DD/YY when it returns the date back to the MPE program.|+|5|Date input.|Allows only numbers and will pre-format them using the date format (ie XX/XX/XX) that is currently selected by the user.  NOTE: The date input will always return the date in the MM/DD/YY format, regardless of what format the user has selected.  For example, if the user has selected the DD/MM/YY format, Input will expect the   user to enter the date in that format, but will then convert it to MM/DD/YY when it returns the date back to the MPE program.|
 |6|Password input.|Allows all characters, but will convert any lower case letters into upper case.  The character that is typed is NOT echoed to the screen.  Instead, it is replaced by the * character so that what they have entered will not be shown on the screen.| |6|Password input.|Allows all characters, but will convert any lower case letters into upper case.  The character that is typed is NOT echoed to the screen.  Instead, it is replaced by the * character so that what they have entered will not be shown on the screen.|
 |7|Lower case input.|Allows all characters, but will convert any lower case letters into upper case.| |7|Lower case input.|Allows all characters, but will convert any lower case letters into upper case.|
mpl_functions.1468847870.txt.gz · Last modified: 2016/07/18 08:17 by gryphon

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki