Mnemonics "L"

From CometWiki

(Difference between revisions)
Jump to: navigation, search
((Line To))
((Log))
 
(8 intermediate revisions not shown)
Line 163: Line 163:
'''Mnemonic:'''  (Line To = x,y)   
'''Mnemonic:'''  (Line To = x,y)   
-
'''Discussion:'''  
+
'''Discussion:''' <br>
-
Draws a line using the currently selected pen from the current location pointer up to but not including the location specified by x, y.<br>
+
Draws a line using the currently selected pen from the current location pointer up to but not including the location specified by x, y.<br>
The current position is set to (x,y).   
The current position is set to (x,y).   
Line 170: Line 170:
== (LineSpacing=LinesPerInch) ==
== (LineSpacing=LinesPerInch) ==
-
<pre>
+
 
-
Mnemonic:  (LineSpacing=LinesPerInch)   
+
'''Mnemonic:'''   (LineSpacing=LinesPerInch)   
-
Discussion:  Set lines-per-inch  
+
 
-
The (LineSpacing) control code adjusts the line spacing for the current font to . Due to differences in font design, when you select a font you may get the desired font but not the desired spacing (external leading may have been applied). This function provides a line spacing override that will adjust the font to fit your page requirements.  
+
'''Discussion:''' Set lines-per-inch <br>
 +
The (LineSpacing) control code adjusts the line spacing for the current font to .<br>
 +
Due to differences in font design, when you select a font you may get the desired font but not the desired spacing (external leading may have been applied).<br>
 +
This function provides a line spacing override that will adjust the font to fit your page requirements.  
   
   
-
Example:     PRINT (LUN) (Line Spacing = 6)
+
'''Example:''' 
 +
  PRINT (LUN) (Line Spacing = 6)
-
</pre>
 
== (LoadControl) ==
== (LoadControl) ==
-
<pre>
+
-
Mnemonic:  (LoadControl = cosDlghDlg$, CntrlID, filename$)   
+
'''Mnemonic:''' (LoadControl = cosDlghDlg$, CntrlID, filename$)  
-
Discussion:  This mnemonic loads a multi-line edit control with the text from a file.  
+
   
-
cosDlghDlg$ is the handle to the dialog
+
'''Discussion:''' This mnemonic loads a multi-line edit control with the text from a file. <br>
-
CntrlID is the control identifier for the edit control
+
cosDlghDlg$ is the handle to the dialog<br>
 +
CntrlID is the control identifier for the edit control<br>
filename$ is the full pathname of a text file containing the text to be loaded  
filename$ is the full pathname of a text file containing the text to be loaded  
   
   
-
Example: Print (LoadControl = cosDlghDlg$, IDC.COMMENTS, ComFile$)
+
'''Example:'''
-
+
  Print (LoadControl = cosDlghDlg$, IDC.COMMENTS, ComFile$)
-
</pre>
+
== (Log) ==
== (Log) ==
-
  <pre>
+
   
-
Email Mnemonic:  (Log=string-argument,string-argument,string-argument)   
+
'''Email Mnemonic:'''   (Log=string-argument,string-argument,string-argument)   
-
Discussion:  The (Log) mnemonic may be used to specify a log file to record the details of the email sending process. The three parameters are a Comet text file name, a Comet directory to which the user has access, and the word 'erase' if the log should be erased each time. If you specify 'cycle', the log will cycle each time an email is sent. The last 7 email logs will be retained. If the log file name is not specified, a file named "email.log" will be used. If the email directory is not specified, "COS" will be used. By default, the file will not be erased and the new log information will be appended to the existing file. If there is no LOG statement at all, no log file will be generated. 
+
-
Example: 
+
-
OPEN (1) "LEH"
+
 +
'''Discussion:'''  The (Log) mnemonic may be used to specify a log file to record the details of the email sending process.<br>
 +
The three parameters are a Comet text file name, a Comet directory to which the user has access, and the word 'erase' if the log should be erased each time.<br>
 +
If you specify 'cycle', the log will cycle each time an email is sent. <br>
 +
The last 7 email logs will be retained. <br>
 +
If the log file name is not specified, a file named "email.log" will be used.<br>
 +
If the email directory is not specified, "COS" will be used. <br>
 +
By default, the file will not be erased and the new log information will be appended to the existing file.<br>
 +
If there is no LOG statement at all, no log file will be generated. 
-
 
+
'''Example:''' 
-
PRINT (1) (Log="email.log","cos","cycle")    ! Produces email logs named email.log and email1.log - email6.log
+
  OPEN (1) "LEH"
-
 
+
  .
-
or
+
  .
-
 
+
  PRINT (1) (Log="email.log","cos","cycle")    ! Produces email logs named email.log and email1.log - email6.log
-
PRINT (1) (Log="email.log","cos","erase")    ! Produces only one log file containing the last email attempt
+
  .
-
 
+
  or
-
or
+
  .
-
 
+
  PRINT (1) (Log="email.log","cos","erase")    ! Produces only one log file containing the last email attempt
-
PRINT (1) (Log="email.log","cos")            ! If you wish to append to an existing file, exclude the third parameter
+
  ,
-
 
+
  or
-
or
+
  ,
-
 
+
  PRINT (1) (Log="email.log","cos")            ! If you wish to append to an existing file, exclude the third parameter
-
Print(20)(Log='','')                        ! Logs to EMAIL.LOG on COS appending multiple email session logs
+
  .
 +
  or
 +
  .
 +
  Print(20)(Log='','')                        ! Logs to EMAIL.LOG on COS appending multiple email session logs
   
   
-
Read about other Email Mnemonics  
+
'''Read''' about other Email Mnemonics
-
 
+
-
</pre>
+

Latest revision as of 20:01, 18 January 2010

Contents

(Launch)

Mnemonic: (Launch=string-argument$)

Discussion: The (Launch) mnemonic launches a Windows application or document.

(Under Comet 504, the (Launch) mnemonic performs the same function as the (Shell to DOS) mnemonic.)

String-argument$ is the name of the Windows program or document to be launched. If string-argument$ is null, this mnemonic launches "My Computer" for your current drive.

Note

The (Launch) mnemonic returns a result string.
Therefore, immediately after issuing this mnemonic, your program should execute an INPUT statement (or dummy INPUT statement) to retrive this value.

History: This mnemonic was added in the REL release 99.01.

Examples: The following examples are based on this simple program:

 LENGTH 254
 LOCAL A$
 .
 A$ = ...            ! Set launch string
 PRINT (Launch=A$)   ! Launch program or document
 INPUT ""            ! Dummy input to retrieve result string
 RUN "QMONITOR"

where A$ is a string containing the name of the Windows program or document to be launched.

Launching a Windows program

  • A$="c:\msoffice\excel\excel.exe"

Launching a Windows program and passing it a file name

  • A$="c:\msoffice\excel\excel.exe c:\budget\1998.xls"

Launching a spreadsheet file

  • A$="c:\budget\1998.xls"

When an "xls" file is launched, Windows automatically runs the Excel program (based on the file extension).

Launching a word processing file

  • A$="c:\memos\report.doc"

When a "doc" file is launched, Windows automatically runs the Word program.

Launching a text file

  • A$="c:\text\sample.txt"

When a "txt" file is launched, Windows automatically runs the associated text editor (Notepad, Wordpad, etc.).

Launching a graphics file

  • A$="c:\images\logo.gif"

When a "gif" file is launched, Windows automatically runs the associated graphics viewer.

Launching an audio file

  • A$="c:\aol\gotmail.wav"

When a "wav" file is launched, Windows automatically runs the associated audio player.

Launching an intranet document

  • A$="c:\intranet\home.htm"

When a local "htm" file is launched, Windows automatically runs the default web browser and displays the HTML document.

Launching an Internet document (web page)

When the launch string starts with "http://", Windows runs the default web browser, connects to the Internet (if not already connected), and displays the named web page.

(LD)

Mnemonic: (LD)

Hex equivalent: "@040A@"

Discussion: Line delete.

The (LD) control code deletes a single line from the video display.
All lines below the current cursor position are moved up one line overwriting the entire cursor line.
A blank foreground line is inserted at the bottom of the screen.
The cursor is inserted at the beginning (left side) of the just-inserted blank line.

Example a.:

100 FORMAT (LD)
  .
  PRINT (0,100)

Example b.

 PRINT (0) (LD)

(LF)

Mnemonic: (LF)

Discussion: Line feed

The (LF) control code advances the paper one line.
If issued at the beginning of a line, this control skips that line and moves to the next line.
If issued in the middle of a print line, (LF) skips the next line on the page and moves two lines below the line where issued.

Example: a. 100 FORMAT "CUSTOMER HISTORY REPORT";(LF); etc.

  .
  OPEN (1) "LP1"
  .
  PRINT (1,100)


Example b. OPEN (1) "LP1"

  .
  PRINT (1) "CUSTOMER HISTORY REPORT";(LF); etc.

This example prints a heading on the printer named LP1, then uses the line feed control code to skip a line.
Since the control code was issued in the middle of a print line, the printer will skip the next line and move two lines below the line where the (LF) was issued.

(LS)

Mnemonic: (LS)

Discussion: Line feed suppress.

The (LS) control code suppresses the line feed for the current print line.

Subsequent data written to the printer will not be followed by an automatic line feed. 

The control is normally used to overstrike, make bold characters, or underscore portions of a print line.
The (LS) control is in effect only for current print line and must be used at the beginning of the FORMAT statement.

Example:

  100  FORMAT (LS);"CUSTOMER HISTORY REPORT",@(0);_
           (CR);"_______________________",@(0)
    .
    OPEN (1) "LP1"
    .
    PRINT (1,100)

This example uses the linefeed suppress control code to underscore the heading of a report.
The (LS) control code is placed at the beginning of a FORMAT statement, followed by the heading to be printed.
The (CR) control code returns the print head to the beginning of the line, but does not perform a line feed, due to the (LS) control in effect.
Finally, a series of underline characters are printed (underscoring the heading

(LI)

Mnemonic: (LI)

Hex equivalent: "@040B@"

Discussion: Line insert.

The (LI) control code inserts a single line in the video display.
The cursor line and all lines below the cursor line are moved down one line.
The bottom display line is lost. A blank foreground line is inserted at the location of the original cursor line.
The cursor is positioned at the beginning of the inserted blank line.

Example a.

 100 FORMAT (LI)
  .
  PRINT (0,100)

Example b.

  PRINT (0) (LI)

(Line To)

Mnemonic: (Line To = x,y)

Discussion:
Draws a line using the currently selected pen from the current location pointer up to but not including the location specified by x, y.
The current position is set to (x,y).

History: This mnemonic is valid in Comet98 and greater.

(LineSpacing=LinesPerInch)

Mnemonic: (LineSpacing=LinesPerInch)

Discussion: Set lines-per-inch
The (LineSpacing) control code adjusts the line spacing for the current font to .
Due to differences in font design, when you select a font you may get the desired font but not the desired spacing (external leading may have been applied).
This function provides a line spacing override that will adjust the font to fit your page requirements.

Example:

  PRINT (LUN) (Line Spacing = 6)

(LoadControl)

Mnemonic: (LoadControl = cosDlghDlg$, CntrlID, filename$)

Discussion: This mnemonic loads a multi-line edit control with the text from a file.
cosDlghDlg$ is the handle to the dialog
CntrlID is the control identifier for the edit control
filename$ is the full pathname of a text file containing the text to be loaded

Example:

  Print (LoadControl = cosDlghDlg$, IDC.COMMENTS, ComFile$)

(Log)

Email Mnemonic: (Log=string-argument,string-argument,string-argument)

Discussion: The (Log) mnemonic may be used to specify a log file to record the details of the email sending process.
The three parameters are a Comet text file name, a Comet directory to which the user has access, and the word 'erase' if the log should be erased each time.
If you specify 'cycle', the log will cycle each time an email is sent.
The last 7 email logs will be retained.
If the log file name is not specified, a file named "email.log" will be used.
If the email directory is not specified, "COS" will be used.
By default, the file will not be erased and the new log information will be appended to the existing file.
If there is no LOG statement at all, no log file will be generated.

Example:

 OPEN (1) "LEH"
 .
 .
 PRINT (1) (Log="email.log","cos","cycle")    ! Produces email logs named email.log and email1.log - email6.log
 .
 or
 .
 PRINT (1) (Log="email.log","cos","erase")    ! Produces only one log file containing the last email attempt
 ,
 or
 ,
 PRINT (1) (Log="email.log","cos")            ! If you wish to append to an existing file, exclude the third parameter
  .
 or
 .
 Print(20)(Log=,)                         ! Logs to EMAIL.LOG on COS appending multiple email session logs


Read about other Email Mnemonics

Personal tools