- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting tons of these warnings for calls to subroutines that are included in my project.
C:Cp32TenTensiz.for(404) : Warning: Symbol not previously declared. [LPRINT]
call LPRINT(box(7),44,0)
How do I get rid of them?
The LPRINT subroutine is in my project, so I'm not sure why it's saying "not declared".
Thanks,
Keith Richardson
C:Cp32TenTensiz.for(404) : Warning: Symbol not previously declared. [LPRINT]
call LPRINT(box(7),44,0)
How do I get rid of them?
The LPRINT subroutine is in my project, so I'm not sure why it's saying "not declared".
Thanks,
Keith Richardson
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Short answer - you have !DEC$ (or !MS$) DECLARE in your source and have not explicitly declared LPRINT. However, the documentation doesn't lead me to believe that a subroutine reference should trigger this warning - IMPLICIT NONE doesn't. I'll ask the appropriate engineer about it.
You can add EXTERNAL LPRINT (or whatever) to "declare" the routines, or switch to using the standard IMPLICIT NONE instead of the old MS DECLARE directive.
Steve
You can add EXTERNAL LPRINT (or whatever) to "declare" the routines, or switch to using the standard IMPLICIT NONE instead of the old MS DECLARE directive.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Longer answer - this is a bug which has been in the compiler for several years! We'll fix it. My advice above still holds.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder how would a still longer answer look like :-)?
Besides, Steve, don't be so eager to say it's a bug -- I'm sure that some Microsoft people would say "oh, it's not a bug, it's a feature" -- after all, these subroutines are kind of undeclared, since they don't have neither EXTERNAL nor INTERFACE block.
(Oh, yes, these warning messages are a real PITA)
Jugoslav
Besides, Steve, don't be so eager to say it's a bug -- I'm sure that some Microsoft people would say "oh, it's not a bug, it's a feature" -- after all, these subroutines are kind of undeclared, since they don't have neither EXTERNAL nor INTERFACE block.
(Oh, yes, these warning messages are a real PITA)
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Luckily we only had one !DEC$ DECLARE statement - and removing it did the trick!
Thanks, Steve.
Keith Richardson
Thanks, Steve.
Keith Richardson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a bug. The documentation clearly states that the behavior should be the same as that for IMPLICIT NONE, which requires that every object with a datatype must be explicitly typed. A subroutine has no type, therefore should not be considered "undeclared" here.
At first, I wondered if MS had a stricter definition, requiring an explicit interface for subroutines, but their manual says not. While this would be an interesting definition, and even useful, it's not what's documented, so bug it is.
Steve
At first, I wondered if MS had a stricter definition, requiring an explicit interface for subroutines, but their manual says not. While this would be an interesting definition, and even useful, it's not what's documented, so bug it is.
Steve

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