User Tools

Site Tools


raw_pass_address_only_.htm
Navigation:  Language Reference > 2 - Program Source Code Format > Prototype Attributes >====== RAW (pass address only) ====== Previous pageReturn to chapter overviewNext page

RAW

blk2blue.jpg

The RAW attribute of a PROCEDURE prototype specifies that STRING or GROUP parameters pass the memory address only. This allows you to pass just the memory address of a *?, STRING, or GROUP parameter, whether passed by value or by reference, to a non-Clarion language procedure or function. Normally, STRING or GROUP parameters pass the address and the length of the string. The RAW attribute eliminates the length portion. For a prototype with a ? parameter, the parameter is taken as a LONG but passed as a “void *” which just eliminates linker warnings. This is provided for compatibility with external library functions that expect only the address of the string.

If a function is prototyped with one of the following return types: ?, *? or *STRING, and the prototype has the RAW attribute, the return value is treated as a LONG.

Example:

MAP

 MODULE('Party3.Obj')                 !A third-party library

Func46 PROCEDURE(*CSTRING),REAL,C,RAW  !Pass CSTRING address-only to C function

 END

END

See Also:

PROCEDURE Prototypes

Prototype Parameter Lists

raw_pass_address_only_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1