Long lines

The underscore character ( _ ) can be used to split "logical" lines of source code, across physical lines in the source code file. The underscore character must be preceded by at least one white space character and is not supported in the ASM statement.

The effect of using a line continuation character is for "visual" appearance only - the compiler itself treats lines split this way as only one contiguous line of code.

For example, if we take the following line of code:

DECLARE FUNCTION Call32& LIB "CALL32.DLL" ALIAS "Call32" (Param1 AS ANY, BYVAL id&)

We could rewrite this line to place its component parts on separate lines of code for clarity:

DECLARE FUNCTION Call32& _

LIB "CALL32.DLL" _

ALIAS "Call32" _

(Param1 AS ANY, BYVAL id&)

The compiler treats text that appears after the line continuation character as a remark. However, we still recommend that such comments are preceded by a REM or an apostrophe ( ' ) symbol to clearly distinguish remarks from the actual code.

DECLARE FUNCTION Call32& _ ' The prototype declaration

LIB "CALL32.DLL" _ ' The DLL name

ALIAS "Call32" _ ' The exported function name

(Param1 AS ANY, _ ' 1st parameter

BYVAL id&) ' 2nd parameter

See Also

Line numbers and Labels

Statement separation

Structured Programming

Variables