@node asmname @unnumberedsec asmname @cindex asmname
(Modified)
@unnumberedsubsec Syntax
@smallexample Var MyVar : asmname 'ExternalName' @var{some type};
Procedure MyProcedure; asmname 'externalproc';
Procedure MyProcedure( MyParam1 : @var{some type} ); asmname 'externalproc';
Function MyFunction: @var{some type}; asmname 'externalfunc'; @end smallexample
@unnumberedsubsec Description
@samp{asmname} allows one to access variables, functions, and/or procedures compiled externally. The difference between @samp{asmname} and @samp{C} is that ASMName sets the name of the procedure to one that will be recognized by the linker.
@unnumberedsubsec Standards
@unnumberedsubsec Example
@unnumberedsubsec See also
@ref{C}
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414
According to Orlando Llanes:
@node asmname @unnumberedsec asmname @cindex asmname
(Modified)
@unnumberedsubsec Syntax
@smallexample Var MyVar : asmname 'ExternalName' @var{some type};
Procedure MyProcedure; asmname 'externalproc';
Perhaps 'ExternalProcName' would be more consistent here?
Procedure MyProcedure( MyParam1 : @var{some type} ); asmname 'externalproc';
Giving the same name two times here might confuse ...
Function MyFunction: @var{some type}; asmname 'externalfunc'; @end smallexample
Hmm ... these are examples, not syntax descriptions, although I agree that they are more illustrative than a pure formal description of the syntax. Maybe we should take more use of the `@var{...}' macro ...
@unnumberedsubsec Description
@samp{asmname}
"The @samp{asmname} directive ..."
allows one to access variables, functions,
^^^ (Is this correct and good English? Unsure - IANANS.)
and/or procedures compiled externally.
"The @samp{external}, @samp{C}, and @samp{C_language} directives do the same; the difference ..."
(Without such an addition the following sentence cannot be understood.
The difference between @samp{asmname} and @samp{C} is that ASMName
^^^^^^^ @samp{asmname}
sets the name of the procedure to one that will be recognized by the linker.
Not true. That's what all of `external', `C', `C_language', and `asmname' do. The difference is that `asmname' allows for explicit specification of the name that the linker will see as a string literal while the others derive this "assembler name" (!:-) from the name of the variable/procedure/function by capitalizing the first character (`external') or setting everything lowercase (`C' and `C_languages' which are indeed identical).
@unnumberedsubsec Standards
@unnumberedsubsec Example
@unnumberedsubsec See also
@ref{C}
"@ref{external}, @ref{C}, @ref{C_language}."
The commas and the point are essential in order to make `@ref{...}' work correctly.
Happy fixing, ;-)
Peter
On Thu, 16 Jul 1998, Peter Gerwinski wrote:
Procedure MyProcedure; asmname 'externalproc';
Perhaps 'ExternalProcName' would be more consistent here?
Possibly, but what I was trying to demonstrate was that the name of a procedure does not have to be the same name as the asmname declaration (I LOVE this features :)~~~ ).
Procedure MyProcedure( MyParam1 : @var{some type} ); asmname 'externalproc';
Giving the same name two times here might confuse ...
Hmmm... Should we just have one procedure declaration with parameters? Or should there be seperate declarations? Reason I have one of each (I know, I know, I didn't add one for the function :P) is to avoid the question of "Will asmname work on procedures with a parameter list?" Maybe there's a better way?
Hmm ... these are examples, not syntax descriptions, although I agree that they are more illustrative than a pure formal description of the syntax. Maybe we should take more use of the `@var{...}' macro ...
What does @var{} do anyway? :}
allows one to access variables, functions,
^^^
(Is this correct and good English? Unsure - IANANS.)
I wrote it as "one" so that I can avoid saying "you", tho it might better to re-word it as "allows access to variables, function, ..." ?
Not true. That's what all of `external', `C', `C_language', and ... and `C_languages' which are indeed identical).
Noted :)
The commas and the point are essential in order to make `@ref{...}' work correctly.
Doh! :)
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414
Orlando Llanes wrote:
Hmmm... Should we just have one procedure declaration with parameters?
Or should there be seperate declarations? Reason I have one of each (I know, I know, I didn't add one for the function :P) is to avoid the question of "Will asmname work on procedures with a parameter list?" Maybe there's a better way?
I think a better way is to give a mere description in the "Syntax" part of the doc section and to give examples only in the "Examples" section at the bottom. If `AsmName' were a procedure rather than a directive, the appropriate syntax description would be a Pascal procedure declaration, i.e. a header such as `Procedure Foo ( Bar: Integer );'. In the present case, we must mention that `AsmName' *is* a directive and describe how it is used, e.g.
@samp{AsmName} (directive)
@var{Procedure or Function heading}; AsmName @var{String constant};
Examples must be there in the "Examples" section, and one should be able to compile them without any modification, preferably. For this reason, they normally should not contain duplicate identifiers.
Good luck,
Peter