Working through the above titled PDF I get a build error with the following line of code:
set an-obj to MyClass::New("Scot")
The error I get is
|
Severity |
Code |
Description |
Project |
File |
Line |
|
Error |
COBCH0012 : Operand MyClass is not declared |
OOSample |
C:\\Users\\mike\\Documents\\Visual Studio 2015\\OOSample\\OOSample\\TestMyClass.cbl |
7 |
TestMyClass.cbl looks like:
program-id. TestMyClass as "OOSample.TestMyClass".
01 an-obj type MyClass.
procedure division.
* set an-obj to new MyClass("Scot")
set an-obj to MyClass::New("Scot")
invoke an-obj::SayHello.
end program TestMyClass.
When I comment out the second "set" statement and uncomment the first, then it works fine.
I am using Visual Cobol Personal Edition 2.3 on Visual Studio 2015 on Windows 10.
#OOCOBOL