HP3000-L Archives

December 1995, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Duane Percox <[log in to unmask]>
Reply To:
Duane Percox <[log in to unmask]>
Date:
Tue, 5 Dec 1995 16:36:04 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
> Bruce responded to my post with:
>Duane Percox writes:
>>There might be another 'gotcha' to worry about. If I remember correctly,
>>COBOL in the absence of a SYSINTR definition will use a shortint if you use
>>this construct and choose a num_value <= 32767:
>>
>>    CALL "\Foo" USING MY-DISPLAY-FIELD  \num_value\
>>          GIVING ANOTHER-COMP-FIELD.
>
>This isn't the case for native-mode COBOL; I assumed, possibly erroneously,
>that the original poster was working in native mode.
>
 
Maybe I'm doing something wrong, but I just tried the following:
 
1. made a pasxl subroutine with formal parms like thus:
 
   procedure c_test( x : integer; y : shortint);
 
2. wrote a nm cobol program with a call like this:
 
   call "c_test" using \x\, \y\.
 
3. Tried various permutations of x/y and this is what I get:
 
x = 1, y = 2        I get a link error specifying an incompatible type (parm #1)
x = 35000, y = 2    Links and runs correctly
x = 35000, y =37000 I get a link error specifying an incompatible type (parm #2)
x = 1, y = 37000    I get a link error with both parms being incompatible.
 
Looks like nm cobol is using the size of the \val\ to determine how much
stack to allocate for the value. Is there maybe a $control setting to
override this?
 
Duane Percox  (QSS)
[log in to unmask] (415-306-1608, fax 415-365-2706)
http://www.aimnet.com/~qssnet/
 ftp://ftp.aimnet.com/pub/users/qssnet/
"The best way to have a good idea is to have a lot of ideas." -- Linus Pauling

ATOM RSS1 RSS2