lx Command

Loads or creates the named file in an Editor window.

Syntax

Parameters

Filename Name of a file to be edited. You can use a wild-card (*) character to specify a range of file names that fit a given pattern.
Note: If you want to open an untitled document with any of the options shown below, you must specify "" for Filename.
/asis
/as
Disable the use of xxx.LXS (save macro) and xxx.LXL (load macro and parser).
/doctype DocType
/dt DocType
Set the file type (doctype) to DocType. DocType can be up to 8 characters in length.
/newring
/nr
Files are opened into a new ring. If split is specified, the new ring is created by splitting the current Editor window. If all is specified, the new ring is opened in a new Editor window.
Note: This parameter is only valid when issued in an Editor window.
/nofilelist
/nfl
Files are opened but not shown in the recently-accessed file list in the File pull-down menu.
/nonewring
/nnr
Files are opened in the current ring.
Note: This parameter is only valid when issued in an Editor window.
/nopro
/np
Disable the use of PROFILE.LX.
/prefixformat format col
/fp format col
Set the display format and starting column of the prefix. If not specified, the default value of col is 1.

Description

If no filename is specified, the lx command opens a new, untitled, document. If a filename is specified, all currently open files are searched. If the file is not found, the Editor looks for the file in the current directory then in the directories specified by LPATH4 or CPPLPATH4. If the file is found, it is loaded. Otherwise, a new file with the given filename is created.

If you create a new document without specifing one of the nonewring or newring parameters, the new document is placed in a new or existing ring according to the value of the ring parameter.

Examples

  1. To load a file named buslet, and set its doctype to .c , type:
    lx buslet /dt c 
  2. To create an untitled file and set its doctype to .c, type:
    lx "" /dt c 
  3. To load all files with a filename extension of cpp into separate rings, each with its own Editor window, type:
    lx *.cpp /nr all 

API Return Codes

-1 
The file name is too long.
-2 
Wild cards (*,?) are not supported by the Editor.
-3 
The file is in use elsewhere.
-6 
An error occurred while reading the file.
-7 
The file is too wide.

godoc Command
prefixformat Parameter
recentmenushow Parameter
ring Parameter
windowshow Parameter