In a .net visual cobol windows form, can a global variable be declared in working storage that references self::?
Working-storage section.
01 s as new self.
Method.
invoke s::GetNumbers().
I know you can use declare x = new self in the method itself, but can you declare a global variable that represents self?
self is already a global variable which can change depending on which object is currently being executed.
If you are within the Form methods then it will contain the current forms instance. If you change to a different object it will contain the value of that object.
What is it that you are trying to accomplish?
In a .net visual cobol windows form, can a global variable be declared in working storage that references self::?
Working-storage section.
01 s as new self.
Method.
invoke s::GetNumbers().
I know you can use declare x = new self in the method itself, but can you declare a global variable that represents self?
not having to type the word self; probably a matter of being lazy i guess.
In a .net visual cobol windows form, can a global variable be declared in working storage that references self::?
Working-storage section.
01 s as new self.
Method.
invoke s::GetNumbers().
I know you can use declare x = new self in the method itself, but can you declare a global variable that represents self?
With more recent versions of Visual COBOL, you do not need to type self:: in this context. It's enough to just do:
invoke GetNumbers()