- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have, as an example, the following line of code: q = card( col )
the variable CARD is typed as CHAR*1; q is typed as INTEGER.
The compile barfed on this one. Does this tell me that the left side of an equation must match the right side?
My question; Can this diagnostic be "cleared' by adding the followin card images:
BYTE bfile( 72 ) then add EQUIVALENCE( CARD, BFILE )
with the corresponding initial statement q = BFILE( col )? Will that, in general, fix dthe mis-match diagnostic error message?
Thanks, kentdeeg
the variable CARD is typed as CHAR*1; q is typed as INTEGER.
The compile barfed on this one. Does this tell me that the left side of an equation must match the right side?
My question; Can this diagnostic be "cleared' by adding the followin card images:
BYTE bfile( 72 ) then add EQUIVALENCE( CARD, BFILE )
with the corresponding initial statement q = BFILE( col )? Will that, in general, fix dthe mis-match diagnostic error message?
Thanks, kentdeeg
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is conversion between numeric types, but not between numeric and character. (The Intel compiler also provides, as an extension, conversion between LOGICAL and numeric types).
Let me suggest instead that you write:
q = IACHAR(card(col)) This will do the conversion you want - IACHAR accepts a character as an argument and returns, as an integer, the position within the ASCII collating sequence, which is the effect you want.
Let me suggest instead that you write:
q = IACHAR(card(col)) This will do the conversion you want - IACHAR accepts a character as an argument and returns, as an integer, the position within the ASCII collating sequence, which is the effect you want.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page