📄 oocobol0.txt
字号:
$set mfoo
*Peter 1) save cppcar.omt as cobolcar.omt
* 2) select class - spec button and remove the CLASS_USER1, CLASS_USER2, and CLASS_USER3 comments
* in CLASS_USER1 enter Array is class "Array"
* 3) you may use these fields to enter precise OOCOBOL code.
* 4) do you have a List Class rather than Array?? if so let's use it
* 5) if you use Windows95/NT can you have long file names - I assume yes
* 6) With Class has no TAB command so we cannot exactly set the column
*------------------------------------------------------------
* Insert your description of class car here
*------------------------------------------------------------
Class-id. CLASS_NAME
data is protected
inherits from BASE_CLASS
with data.
Object section.
*------------------------------------------------------------
* Insert names of other classes used here
*------------------------------------------------------------
Class-control.
[BASE_CLASS is class "BASE_CLASS"]
CLASS_NAME is class "$CLASS_NAME"
[ASSOCIATION_ONE_CLASS is class "ASSOCIATION_ONE_CLASS"]
[ASSOCIATION_MANY_CLASS is class "ASSOCIATION_MANY_CLASS"]
[AGGREGATION_ONE_CLASS is class "AGGREGATION_ONE_CLASS"]
[AGGREGATION_MANY_CLASS is class "AGGREGATION_MANY_CLASS"]
* in Class - Spec - enter Array is class "Array"
CLASS_USER1
.
*------------------------------------------------------------
* Insert shared data declarations here (class and instance).
*------------------------------------------------------------
working-storage section.
$set sourceformat(free)
77 char pic x is typedef.
77 uns-char pic 9(2) comp-5 is typedef.
77 short pic s9(4) comp-5 is typedef.
77 uns-short pic 9(4) comp-5 is typedef.
77 int pic s9(9) comp-5 is typedef.
77 uns-int pic 9(9) comp-5 is typedef.
77 long pic s9(9) comp-5 is typedef.
77 uns-long pic 9(9) comp-5 is typedef.
77 d-l-float comp-2 is typedef.
77 d-float comp-2 is typedef.
77 float comp-1 is typedef.
77 proc-pointer procedure-pointer is typedef.
77 data-pointer pointer is typedef.
77 void pic 9(2) comp-5 is typedef.
$set sourceformat(fixed)
*------------------------------------------------------------
* Insert your class data declarations here
*------------------------------------------------------------
object-storage section.
*------------------------------------------------------------
* Add any class initialization code to the procedure division
*------------------------------------------------------------
procedure division.
exit program.
Method-id. "classMethod".
*------------------------------------------------------------
* Insert your data declarations here
*------------------------------------------------------------
local-storage section.
linkage section.
*------------------------------------------------------------
* Insert your procedure specification here
*------------------------------------------------------------
procedure division.
exit method.
end method "classMethod".
object.
*------------------------------------------------------------
* Insert your object instance data declarations here
*------------------------------------------------------------
object-storage section.
[01 ATTRIBUTE_NAME ATTRIBUTE_TYPE.]
[01 maxNumberOf$ASSOCIATION_MANY_CLASS int.]
[01 maxNumberOf$AGGREGATION_MANY_CLASS int.]
[01 ASSOCIATION_ONE_NAME object reference.]
[01 AGGREGATION_ONE_NAME object reference.]
[01 ASSOCIATION_MANY_NAME object reference.]
[01 AGGREGATION_MANY_NAME object reference.]
[
Method-id. "OPERATION_NAME".
*------------------------------------------------------------
* Insert your data declarations here
*------------------------------------------------------------
local-storage section.
linkage section.
*------------------------------------------------------------
* Insert your procedure specification here
*------------------------------------------------------------
procedure division.
* OPERATION_CODE
exit method.
end method "OPERATION_NAME".]
end object.
end class CLASS_NAME.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -