Wiki source for KeyPgDdline


Show raw source

{{fbdoc item="title" value="__LINE__"}}----
Intrinsic define (macro value) set by the compiler

{{fbdoc item="syntax"}}##
""__LINE__""
##
{{fbdoc item="desc"}}
Substituted with the current line number of the source file where used.

Its normal use is to report wrong values in debugging.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/defines/line.bas"}}%%(freebasic)
dim a as integer

If a < 0 Then
Print "Error: a = " & a & " in " & __FILE__ & " (" & __FUNCTION__ & ") line " & __LINE__
end if
%%

%%
Error: a = -32767 in test.bas (MAIN) line 47
%%

{{fbdoc item="diff"}}
- Did not exist in QB

{{fbdoc item="see"}}
- ##[[KeyPgDdfile|__FILE__]]##
- ##[[KeyPgDdfunction|__FUNCTION__]]##

{{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}}
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode