forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using C and C++ with FTN95

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Thu Dec 18, 2014 3:51 pm    Post subject: Using C and C++ with FTN95 Reply with quote

I have a large body of code to produce printed output, and cannot get it to compile successfully. The issue appears to be with the "bool" data type.

Is bool not allowed in SCC?

Also, function overloading does not appear to be possible.

Thanks,
Bill
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Dec 18, 2014 7:15 pm    Post subject: Reply with quote

Bill,

The SCC.hlp file ought to answer this, it's supposed to be accessible from PLATO or it is in the FTN95 install directory. HLP has not been the default helpfile format for a very long time, and Microsoft in its wisdom decided not to support it in Windows 7 (and presumably, later).

Worth keeping an old XP machine going!

Eddie
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Thu Dec 18, 2014 8:48 pm    Post subject: Reply with quote

The HELP file was not any help. I did find an option (by doing a CONFIG) that might have worked. I got past this error by defining a bool, and both true and false.

Now, can't get the C code to link with the FTN code. Much more obscure what the problem is there. If I include the C code for the interface routine in the FTN list of files, it gets linked in. But, if I create a library with this routine, there is a name difference that the linker is not picking up.

I posted a different forum post for this with some additional information.

I still like the product. But, if I can't get the "C" code incorporated via a library call, ......
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Dec 18, 2014 10:10 pm    Post subject: Re: Using C and C++ with FTN95 Reply with quote

wahorger wrote:
Is bool not allowed in SCC?
Bill

Whether bool is a standard type or not depends on the version of the C standard in effect. The following code works with SCC.
Code:
#include <stdio.h>
#include <bool.h>
int main(){
int i=3,j=4;
bool x;
x=i > j;
printf("%s\n",x ? "TRUE" : "FALSE");
}

Eddie, you need not resurrect XP just to use WinHelp; see http://www.microsoft.com/en-us/download/details.aspx?id=91
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Thu Dec 18, 2014 10:13 pm    Post subject: Reply with quote

Thanks for the bool.h tip.

Bill
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Dec 18, 2014 11:02 pm    Post subject: Reply with quote

I need XP to run my slide scanner: in Windows 7 its drivers conflict with my NAS!

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group