Re: What is the purpose of the External. (1173 Views)
Reply
Occasional Advisor
Ashwin80
Posts: 15
Registered: ‎07-05-2011
Message 1 of 3 (1,212 Views)

What is the purpose of the External.

Hi,

 

When i use TAL programing . If i use External to  "source-in2 file" the program and i am using the call  from some other  "source- in1 file".

 

Whether two file are compiled separately and it can be binded through BIND utility.or we can compile only one  file and we get the one object.

 

And what is the difference between the two object.

 

ashwin. 

Visitor
BVoris
Posts: 3
Registered: ‎06-30-2011
Message 2 of 3 (1,180 Views)

Re: What is the purpose of the External.

I don't know that I understand your question. EXTERNAL is a keyword that tells the TAL compiler that a procedure definition will be found either a link time or at runtime.  For example, all the procedures in EXTDECS are marked EXTERNAL.  In other words, EXTERNAL is equivalent to the C/C++ ";" after a function declarations.  For example, these two are semantically equivalent:

-- TAL declaration
int foo (p1);

int p1;

external;

 

/* C declaration */

short FOO (short p1);

Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 3 of 3 (1,173 Views)

Re: What is the purpose of the External.

>these two are semantically equivalent:

 

Except it would be better to actually use extern keyword for the C case:

extern short FOO(short p1);

 

(And probably nobody would use short for C parms and returns.  :-)

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.