user5182503
user5182503

Reputation:

What is a selective parameter in escape codes in ISO/IEC 6429:1992?

According to ECMA-48/5th

8.1
Types of control functions
...
f) (Pn...): Control sequence with any number of numeric parameters
g) (Ps): Control sequence with a single selective parameter
...
i) (Ps...): Control sequence with any number of selective parameters

And for example set mode function is defined this way with Ps... paramters:

8.3.125
SM - SET MODE
Notation: (Ps...)
Representation: CSI Ps... 06/08
No parameter default value.
SM causes the modes of the receiving device to be set as specified by the parameter values:
1 GUARDED AREA TRANSFER MODE (GATM)
2 KEYBOARD ACTION MODE (KAM)
3 CONTROL REPRESENTATION MODE (CRM)
...

I wanted to test this function with xterm, but in xterm set mode function is defined differently (link):

Pm   Any number of single numeric parameters, separated by ;
     character(s).  Individual values for the parameters are listed with
     Ps .

....
CSI Pm h  Set Mode (SM).
    Ps = 2  ⇒  Keyboard Action Mode (KAM).
    Ps = 4  ⇒  Insert Mode (IRM).
    Ps = 1 2  ⇒  Send/receive (SRM).
    Ps = 2 0  ⇒  Automatic Newline (LNM).

Could anyone explain what selective parameter is and the difference between selective parameters (Ps...) and any number numeric parameters (Pn...) in ISO 6429?

Upvotes: 1

Views: 88

Answers (1)

Thomas Dickey
Thomas Dickey

Reputation: 54583

Numbers in ECMA-48 are generally one of two types:

  • something that lets an application select a feature from a list of options (e.g., selecting underlining or normal text from the list of graphic renditions), or

  • something that lets an application specify the value of something (e.g., the number of rows by which to move the cursor)

That's been part of ECMA-48 since the mid/late-1970s. Not everyone on the committee understood that. Take a look at this page, and search for "BSR X3.64" to see an example of the state of confusion by committee members on ECMA-48.

Upvotes: 0

Related Questions