What should I use for USAGE HANDLE items instead of NULL?
Question:
My program uses a lot of USAGE HANDLE items that I set to NULL and check for NULL to mean that the handle has not been created yet.
The compiler gives errors such as the following when I compare a USAGE HANDLE item with NULL in a conditional expression. What should I use instead of NULL? Should I use LOW-VALUE?
--S: Illegal condition IF; file = swlibs\SWMESG.PL, line = 1005, col 4
Here is an example:
000000 IF CUST-FONT-HANDLE NOT = NULL
000000 MOVE CUST-FONT-HANDLE TO TEXT-FONT-HANDLE
000000 MOVE NULL TO CUST-FONT-HANDLE.
I also get errors on MOVE NULL when the destination item is USAGE HANDLE.
Answer:
The fastest solution is to compile with compiler option -ca.
Authored
by: Veryant Support
This question has been viewed 8450 times so far.
Click
Here to View all the questions in isCOBOL General
category.
File Attachments
There are no attachment file(s) related to this question.
User Comments
There are no user comments for this question. Be the first to post a comment. Click Here