ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
来源:互联网 发布:福彩3d软件分析软件 编辑:程序博客网 时间:2024/06/06 15:52
可以用 ASSIGN 语句将字段 串的特殊组 件分配给字 段符号,过 程如下:
语法
ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
系统将字符 串 <s> 的组件 <comp> 分配给字段 符号 <FS>。 可以指定 <comp> 为文字或变 量。如果 <comp> 属于类型 C 或字段串( 象组件一样 没有内表) ,它指定组 件的名称。 如果 <comp> 有任何其它 基本数据类 型,将被转 化为类型 I(参见 类型转换 (页 6–36) ),并且指 定组件号。
如果分配成 功,SY-SUBRC 设为 0。否则, 返回 4。
DATA: BEGIN OF LINE,
COL1 TYPE I VALUE '11',
COL2 TYPE I VALUE '22',
COL3 TYPE I VALUE '33',
END OF LINE.
DATA COMP(5) VALUE 'COL3'.
FIELD-SYMBOLS: <F1>, <F2>, <F3>.
ASSIGN LINE TO <F1>.
ASSIGN COMP TO <F2>.
DO 3 TIMES.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
WRITE <F3>.
ENDDO.
ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
WRITE / <F3>.
输出如下:
11 22 33
33
该示例中, <F1> 指向字段串 LINE, <F2> 指向字段 COMP。 循环中,LINE 的组件由其 号码指定, 并且一个接 一个地被分 配到 <F3>。 循环之后, LINE 的组件 COL3 由其名称指 定,并被分 配到 <F3>。
- ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
- ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>
- ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
- Adjust structure size to power of two
- Cost Component Structure
- How to creating a Component of Joomla
- What's the methodLists attribute of the structure objc_class for?
- The Lost Art of C Structure Packing - Eric S. Raymond
- 131.View the Exhibit and examine the structure of the PRODUCT, COMPONENT, and PDT_COMP tables.
- attempt to reference field of non-structure array
- [Matlab]Attempt to reference field of non-structure array
- E2288 Pointer to structure required on left side of -> or ->*
- Assign Chart of Depreciation to Company code in SAP
- Cannot assign value of type 'InterfaceController' to type 'HKWorkoutSessinDelegate'
- Cannot assign value of type 'AnyObject' to type 'HereIsTheTypeName?'
- Tensorflow error : Assign requires shapes of both tensors to match
- Vue component-based application structure
- Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].S
- haproxy 4层和7层负载
- linux下基于libRTMP的接收流媒体的程序
- Oracle ADDM性能诊断利器及报告解读
- linux 防火墙设置及查看
- 分析服务升级数据库脚本编码问题
- ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
- 斗地主AI算法——第十四章の主动出牌(3)
- selenium的chromedriver与chrome浏览器的对应关系表
- Linux netstat命令详解
- bzoj1057(洛谷1169)最大01子矩阵和最大01子正方形
- 爬取新浪微博数据+新浪微博模拟登录+mysql+python
- mysql中sql语句的妙用
- kMeans算法(K均值聚类算法)
- servlet