Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: How do I get prototypes for external procedures?
Topic Summary:
Created On: 26-Aug-2003 07:39
Status: Read Only
Rate this topic Rate this topic
Terrible Terrible
Poor Poor
Fair Fair
Good Good
Very Good Very Good
Excellent Excellent
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 26-Aug-2003 07:39
User is offline View Users Profile Print this message


Hans Odeberg

Posts: 1
Joined: 20-Aug-2003

Consider the following, simple external procedure example:

PROCEDURE GetDelay;
FPAR IN a AlarmCode;
RETURNS Duration;
EXTERNAL;

The code generator will insert calls to the C function GetDelay in the generated C file - but since there is no prototype, the compiler will generate an error. How can I easiest get the prototype into the generated files?

Today, I insert a small #CODE block after the FPAR line:

PROCEDURE GetDelay;
FPAR IN a AlarmCode;
/*#CODE
#HEADING
#(Duration) GetSmDelay(#(AlarmCode));
*/
RETURNS Duration;
EXTERNAL;

It works, but it is not very pretty - I have some strange aversion to #CODE statements... anyone have an idea for a cleaner solution?

Greetings,

Hans Odeberg
Gambro Lundia AB
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 1 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.