Mnemonics "F"

From CometWiki

(Difference between revisions)
Jump to: navigation, search
m
((FindNextFile))
 
(9 intermediate revisions not shown)
Line 1: Line 1:
== (FF) ==
== (FF) ==
-
Mnemonic:  (FF)   
+
'''Mnemonic:'''   (FF)   
-
<p>Discussion:  Form feed  
+
 
-
<p>The (FF) control code causes the printer to skip to the top of the next page.  
+
'''Discussion:''' Form feed  
 +
 
 +
The (FF) control code causes the printer to skip to the top of the next page.  
   
   
-
<p>Example:  
+
'''Example: a.'''
-
<pre>
+
 
-
a. 100 FORMAT (FF)
+
  100 FORMAT (FF)
   .
   .
   OPEN (1) "LP1"
   OPEN (1) "LP1"
Line 14: Line 16:
-
b. OPEN (1) "LP1"
+
'''Example b.'''
 +
  OPEN (1) "LP1"
   .
   .
   PRINT (1) (FF)
   PRINT (1) (FF)
-
</pre>
 
-
<p>This example shows how to perform a form feed operation on the printer named LP1. 
 
 +
This example shows how to perform a form feed operation on the printer named LP1.
==  (FileStatus)  ==
==  (FileStatus)  ==
Line 31: Line 33:
*Flags is the sum of the specified decimal values from the following chart:  
*Flags is the sum of the specified decimal values from the following chart:  
-
<p>Flag Description
+
<p>Flag
-
# Perform function on the CometAnywhere client system (or wherever COSW resides for this session).  
+
<p>
-
# Perform function on the CometAnywhere host system (or wherever COSC resides for this session).
+
0- Perform function on the server, CometAnywhere or not.
 +
<p>
 +
1- Perform function on the client, CometAnywhere or not.
 +
<p>
 +
2- Perform function for CometAnywhere only and perform it on the client.
<p>After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the file status information and error information. For example:  
<p>After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the file status information and error information. For example:  
-
<pre>
+
>
   LENGTH 2 & LOCAL AX$,DX$
   LENGTH 2 & LOCAL AX$,DX$
Line 98: Line 104:
   
   
-
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
+
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
-
</pre>
+
== (FindFirstFile) ==
== (FindFirstFile) ==
-
<pre>
+
 
Mnemonic:  (FindFirstFile=file,flags)   
Mnemonic:  (FindFirstFile=file,flags)   
Discussion:  This mnemonic finds the first file in a Windows folder that matches the file name criteria.  
Discussion:  This mnemonic finds the first file in a Windows folder that matches the file name criteria.  
Line 109: Line 114:
The file name is in Windows format, UNC format, or a directory alias. The file name may be a specific name or a wild card value (e.g., c:\samplefiles\*.*).  
The file name is in Windows format, UNC format, or a directory alias. The file name may be a specific name or a wild card value (e.g., c:\samplefiles\*.*).  
-
Flags is the sum of the specified decimal values from the following chart:
+
Flags are defined as for the (FileStatus) mnemonic above.
-
 
+
-
Flag Description
+
-
1 Perform function at CometAnywhere remote system
+
-
2 If not CometAnywhere, then substitute local for remote
+
-
If the program is running on a local Comet system (not on a CometAnywhere client system), this flag substitutes the local drive/path name for a remote path/drive name.
+
-
+
Line 179: Line 178:
   
   
-
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
+
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
-
</pre>
+
 
== (FindNextFile) ==
== (FindNextFile) ==
-
<pre>
+
Mnemonic:  (FindNextFile=flags)   
Mnemonic:  (FindNextFile=flags)   
Discussion:  This mnemonic finds the next file (in ASCII order) in a Windows folder.  
Discussion:  This mnemonic finds the next file (in ASCII order) in a Windows folder.  
Line 191: Line 190:
Example: The (FindFirstFile) mnemonic can be used to find the first file matching a certain wild card value, then the (FindNextFile) can be used, repeatedly, to find subsequent files matching the same wild card value.  
Example: The (FindFirstFile) mnemonic can be used to find the first file matching a certain wild card value, then the (FindNextFile) can be used, repeatedly, to find subsequent files matching the same wild card value.  
-
Flags is the sum of the specified decimal values from the following chart:
+
<p>
 +
Flags are defined as for the (FileStatus) mnemonic above.
-
Flag Description
 
-
1 Perform function at CometAnywhere remote system
 
-
2 If not CometAnywhere, then substitute local for remote
 
-
If the program is running on a local Comet system (not on a CometAnywhere client system), this flag substitutes the local drive/path name for a remote path/drive name.
 
-
 
Line 261: Line 256:
   
   
-
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
+
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.
-
</pre>
+
 
== (Flush) ==
== (Flush) ==
-
<pre>
+
 
   
   
Mnemonic:    (Flush)   
Mnemonic:    (Flush)   
Line 281: Line 276:
   .
   .
   PRINT (1) (Flush
   PRINT (1) (Flush
-
</pre>
+
 
== (Force Close) ==
== (Force Close) ==
-
<pre>
+
 
Mnemonic:  (Force Close=server-number, filename, directory)   
Mnemonic:  (Force Close=server-number, filename, directory)   
Discussion:   
Discussion:   
Example:   
Example:   
-
</pre>
+
 
== (Force Logout) ==
== (Force Logout) ==
-
<pre>
+
 
Mnemonic:  (Force Logout=server-number, node-name)   
Mnemonic:  (Force Logout=server-number, node-name)   
Discussion:   
Discussion:   
Example:   
Example:   
-
</pre>
+
 
 +
 
 +
 
 +
 
 +
 
 +
==  (From) ==
 +
 +
Email Mnemonic:  (From=string-argument) 
 +
Discussion:  The (From) mnemonic specifies the sender's name and email address for your email message. 
 +
Example:  PRINT (1) (From='"jim guerber"<jim@@signature.net>')
 +
 
 +
 +
Read about other Email Mnemonics 
 +
 
== (FT) ==
== (FT) ==
-
<pre>
+
Mnemonic:  (FT)   
Mnemonic:  (FT)   
Hex equivalent:  "@0408@"   
Hex equivalent:  "@0408@"   
Line 311: Line 319:
In this example, the force transmit control code is used to force the transmission of a value for the ANSWER$ variable.   
In this example, the force transmit control code is used to force the transmission of a value for the ANSWER$ variable.   
-
</pre>
 
-
== (FF) ==
+
== (Full Scan Codes Passed) ==
-
<pre>
+
-
Mnemonic:  (FF) 
+
-
Discussion:  Form feed
+
-
The (FF) control code causes the printer to skip to the top of the next page.
+
-
+
-
Example:  a. 100 FORMAT (FF)
+
-
  .
+
-
  OPEN (1) "LP1"
+
-
  .
+
-
  PRINT (1,100)
+
-
 
-
b. OPEN (1) "LP1"
 
-
  .
 
-
  PRINT (1) (FF)
 
-
 
-
This example shows how to perform a form feed operation on the printer named LP1. 
 
-
 
-
</pre>
 
-
==  (From) ==
 
-
<pre>
 
-
Email Mnemonic:  (From=string-argument) 
 
-
Discussion:  The (From) mnemonic specifies the sender's name and email address for your email message. 
 
-
Example:  PRINT (1) (From='"jim guerber"<jim@@signature.net>')
 
-
 
-
 
-
Read about other Email Mnemonics 
 
-
 
-
</pre>
 
-
==  (Full Scan Codes Passed) ==
 
-
<pre>
 
Mnemonic:  (Full Scan Codes Passed)   
Mnemonic:  (Full Scan Codes Passed)   
Hex equivalent:  "@0E000E@"   
Hex equivalent:  "@0E000E@"   
Line 361: Line 338:
b. PRINT (0) (Full Scan Codes Passed
b. PRINT (0) (Full Scan Codes Passed
-
</pre>
 

Latest revision as of 15:29, 22 August 2011

Contents

(FF)

Mnemonic: (FF)

Discussion: Form feed

The (FF) control code causes the printer to skip to the top of the next page.

Example: a.

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


Example b.

 OPEN (1) "LP1"
  .
  PRINT (1) (FF)

This example shows how to perform a form feed operation on the printer named LP1.

(FileStatus)

Mnemonic: (FileStatus=file,flags)

Discussion: This mnemonic returns status information about a Windows file.

This mnemonic may be used by foreground programs only.

  • The file name is in Windows format, UNC format, or a directory alias.
  • Flags is the sum of the specified decimal values from the following chart:

Flag

0- Perform function on the server, CometAnywhere or not.

1- Perform function on the client, CometAnywhere or not.

2- Perform function for CometAnywhere only and perform it on the client.

After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the file status information and error information. For example: > LENGTH 2 & LOCAL AX$,DX$ LENGTH 254 & LOCAL RESULT$ ResultFmt: FORMAT AX$;DX$;RESULT$ . . Print (FileStatus=File$,Flags) Input (0,ResultFmt)  ! The file name starts at position 31 Result$ = Sub(Result$, 31, 254)  ! Find length of strng Delim = Pos("@00@", Result$) If (Delim NE 0) Then _ Result$ = Sub(Result$, 1, Delim-1) Print "Filename:";Result$ The file name starts at position 31 of the RESULT$ field. This mnemonic also returns two error fields. The first of these, AX$, contains the function error code, and the second one, DX$, contains the suberror code (aka the Windows file error code). Both of these fields are in Intel 2's complement format, and should be processed as follows: AX$ = SUB(AX$,2,1) + SUB(AX$,1,1)  ! Flip the bytes around DX$ = SUB(DX$,2,1) + SUB(DX$,1,1)  ! Flip the bytes around FuncError = HexDec(AX$)  ! Function error code (decimal) FileError = HexDec(DX$)  ! File error code (decimal)  ! For unexpected values, convert to 2's complement signed integer If (FuncError > 32767) FuncError = FuncError-65536 If (FileError > 32767) FileError = FileError-65536 Here is a list of the function error codes in decimal form: Error (FuncError) Description 0 Function not supported 1 Success 2 CometAnywhere required 3 Source file error (see suberrors) 4 Aborted by user 5 Function in progress Here is a list of the suberror codes (common Windows file errors) in decimal form: Suberror (FileError) Description 0 Success 2 File not found 3 Path not found 5 Access denied 12 Invalid access 15 Invalid drive 16 An error has occurred in the current directory 18 No more files 32 Sharing violation 33 Lock violation 80 File exists 161 Bad pathname History: This mnemonic was added in Comet Build 299 and REL Version 01.07.

(FindFirstFile)

Mnemonic: (FindFirstFile=file,flags) Discussion: This mnemonic finds the first file in a Windows folder that matches the file name criteria. This mnemonic may be used by foreground programs only.

The file name is in Windows format, UNC format, or a directory alias. The file name may be a specific name or a wild card value (e.g., c:\samplefiles\*.*).

Flags are defined as for the (FileStatus) mnemonic above.


After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the file and error information. For example:

 LENGTH 2 & LOCAL AX$,DX$
 LENGTH 254 & LOCAL RESULT$
 ResultFmt: FORMAT AX$;DX$;RESULT$
 .
 .
 Print (FindFirstFile=File$,Flags)
 Input (0,ResultFmt)
 ! The file name starts at position 45
 Result$ = Sub(Result$, 45, 254)
 ! Find length of strng
 Delim = Pos("@00@", Result$)
 If (Delim NE 0) Then _
 Result$ = Sub(Result$, 1, Delim-1)
 Print "Filename:";Result$

The file name starts at position 45 of the RESULT$ field. This mnemonic also returns two error fields. The first of these, AX$, contains the function error code, and the second one, DX$, contains the suberror code (aka the Windows file error code). Both of these fields are in Intel 2's complement format, and should be processed as follows:

 AX$ = SUB(AX$,2,1) + SUB(AX$,1,1)   ! Flip the bytes around
 DX$ = SUB(DX$,2,1) + SUB(DX$,1,1)   ! Flip the bytes around
 FuncError = HexDec(AX$)             ! Function error code (decimal)
 FileError = HexDec(DX$)             ! File error code (decimal)
 ! For unexpected values, convert to 2's complement signed integer
 If (FuncError > 32767) FuncError = FuncError-65536
 If (FileError > 32767) FileError = FileError-65536

Here is a list of the function error codes in decimal form: Error (FuncError) Description 0 Function not supported 1 Success 2 CometAnywhere required 3 Source file error (see suberrors) 4 Aborted by user 5 Function in progress


Here is a list of the suberror codes (common Windows file errors) in decimal form:

Suberror (FileError) Description 0 Success 2 File not found 3 Path not found 5 Access denied 12 Invalid access 15 Invalid drive 16 An error has occurred in the current directory 18 No more files 32 Sharing violation 33 Lock violation 80 File exists 161 Bad pathname


History: This mnemonic was added in Comet Build 299 and REL Version 01.07.

(FindNextFile)

Mnemonic: (FindNextFile=flags) Discussion: This mnemonic finds the next file (in ASCII order) in a Windows folder. This mnemonic may be used by foreground programs only.

This mnemonic is issued after the (FindFirstFile) mnemonic or after the (FindNextFile) mnemonic

Example: The (FindFirstFile) mnemonic can be used to find the first file matching a certain wild card value, then the (FindNextFile) can be used, repeatedly, to find subsequent files matching the same wild card value.

Flags are defined as for the (FileStatus) mnemonic above. After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the file and error information. For example: LENGTH 2 & LOCAL AX$,DX$ LENGTH 254 & LOCAL RESULT$ ResultFmt: FORMAT AX$;DX$;RESULT$ . . Print (FindNextFile=Flags) Input (0,ResultFmt)  ! The file name starts at position 45 Result$ = Sub(Result$, 45, 254)  ! Find length of strng Delim = Pos("@00@", Result$) If (Delim NE 0) Then _ Result$ = Sub(Result$, 1, Delim-1) Print "Filename:";Result$ The file name starts at position 45 of the RESULT$ field. This mnemonic also returns two error fields. The first of these, AX$, contains the function error code, and the second one, DX$, contains the suberror code (aka the Windows file error code). Both of these fields are in Intel 2's complement format, and should be processed as follows: AX$ = SUB(AX$,2,1) + SUB(AX$,1,1)  ! Flip the bytes around DX$ = SUB(DX$,2,1) + SUB(DX$,1,1)  ! Flip the bytes around FuncError = HexDec(AX$)  ! Function error code (decimal) FileError = HexDec(DX$)  ! File error code (decimal)  ! For unexpected values, convert to 2's complement signed integer If (FuncError > 32767) FuncError = FuncError-65536 If (FileError > 32767) FileError = FileError-65536 Here is a list of the function error codes in decimal form: Error (FuncError) Description 0 Function not supported 1 Success 2 CometAnywhere required 3 Source file error (see suberrors) 4 Aborted by user 5 Function in progress Here is a list of the suberror codes (common Windows file errors) in decimal form: Suberror (FileError) Description 0 Success 2 File not found 3 Path not found 5 Access denied 12 Invalid access 15 Invalid drive 16 An error has occurred in the current directory 18 No more files 32 Sharing violation 33 Lock violation 80 File exists 161 Bad pathname History: This mnemonic was added in Comet Build 299 and REL Version 01.07.

(Flush)

Mnemonic: (Flush) Discussion: The (Flush) mnemonic causes any pending data retained by the spooler to be sent to the printer. This has the same affect as closing and reopening the printer, allowing for easier forms alignment. Previously, this was done automatically when no print data was sent for 2 seconds. However, this technique seemed to cause difficulty for some. History: Support for this mnemonic was added in Build 294. Note: Originally, the (Flush) mnemonic was intended for RAW printers. As of Build 323, the (Flush) mnemonic may also be used on non-RAW printers.

Example: a. 100 FORMAT (Flush)

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


b. OPEN (1) "LP1"

  .
  PRINT (1) (Flush

(Force Close)

Mnemonic: (Force Close=server-number, filename, directory) Discussion: Example:


(Force Logout)

Mnemonic: (Force Logout=server-number, node-name) Discussion: Example:




(From)

Email Mnemonic: (From=string-argument) Discussion: The (From) mnemonic specifies the sender's name and email address for your email message. Example: PRINT (1) (From='"jim guerber"<jim@@signature.net>')


Read about other Email Mnemonics   

(FT)

Mnemonic: (FT) Hex equivalent: "@0408@" Discussion: Force transmit. The (FT) control code causes the video device to set read request. The video device responds as though the operator pressed the transmit key.

This control code should be placed in a write format that occurs just before a READ or INPUT statement in the program.

Example: 100 FORMAT (FT)

   .
   PRINT (0,100)
   INPUT (0) ANSWER$

In this example, the force transmit control code is used to force the transmission of a value for the ANSWER$ variable.

(Full Scan Codes Passed)

Mnemonic: (Full Scan Codes Passed) Hex equivalent: "@0E000E@" Discussion: This mnemonic turns on "full scan code mode." In this mode, the complete list of keyboard scan codes are sent to the Internet Basic program. See Scan Codes for a complete list of codes.

This mode is turned off with the (Scan Codes Off) mnemonic.

Also see the following references: (Partial Scan Codes On) (Partial Scan Codes Off)

Example: a. 100 FORMAT (Full Scan Codes Passed)

  .
  PRINT (0,100

b. PRINT (0) (Full Scan Codes Passed

Personal tools