ISO/IEC 6429:1992 中转义码中的选择性参数是什么?

发布于 2025-01-15 07:13:59 字数 1250 浏览 1 评论 0原文

根据 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

例如,设置模式函数是用 Ps... 参数定义的:

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)
...

我想用 xterm 测试这个函数,但在 xterm 中设置模式函数的定义不同( 链接):

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).

任何人都可以解释什么是选择性参数以及选择性参数之间的区别(Ps...) 和 ISO 6429 中的任何数字参数 (Pn...)?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流绪微梦 2025-01-22 07:13:59

ECMA-48 中的数字通常是以下两种类型之一:

  • 让应用程序从选项列表中选择某个功能(例如,选择下划线或普通文本)来自图形再现列表),或

  • 允许应用程序指定某项的内容(例如,移动光标的行数)

自中期/后期以来,这一直是 ECMA-48 的一部分-1970 年代。并非委员会中的每个人都明白这一点。看看此页面,然后搜索“BSR X3.64”以查看委员会成员在 ECMA-48 上的混乱状态的示例。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文