IRIS / Chronicles 中 针对字符串和数字的 padded 填充

Numeric IDs must be purely numeric. They are stored as numbers - no spaces are prepended before storage. As a result, they do not have “internal forms” or “external forms”

针对数字的 Padded,因为是数字,那么 Padded 不会在前面添加空格,值有 String 字符串的时候才会在前面添加空格。

正是因为数字的这个特性,所以对数字而言的 IDs 就没有了 “internal forms” 或 “external forms” 的概念了。

Padded string IDs can be alpha-numeric and should contain 1 less character than the padded string length (For example, if the padded string length for the master file as defined in the dictionary is 10, then the ID must be between 1 and 9 alpha-numeric characters). This allows Chronicles to add at least one space to the front of the ID before storing it in desired sort order. Padded strings have both internal forms (ID+spaces to create a string of the appropriate length) and external forms (the ID stripped of any leading spaces). If the original (unpadded) ID is greater than or equal to the ID length defined by the master file, the ID is still padded with one space when used internally in Chronicles.

针对字符串的 IDs 的 Padded 就会有在字符串前面不管 Padded 是什么都会加一个空格的情况。在数据库中的存储是有空格的,但是对网络 ID 来说就删除了这个空格,external IDs 就是删除了空格的 ID。

To add padding to an unpadded ID, call $$getidin. To strip padding from an internally formatted id, call $$getidout. Calling $$getidin on an internally formatted ID or $$getidout on an externally formatted ID does nothing.

对 Padded 的 IDs 的处理,需要分别调用 $$getidin 和 $$getidout 函数。

这 2 个函数是添加空格和删除空格的,
针对 internal IDs 调用 $getidin 函数没有意义,因为 internal IDs 对字符串是有空格的。
针对 external IDs 调用 $getidout 函数没有意义,因为 external IDs 对字符串已经把空格给删除处理了。