Compiler flag -l
#1

What is the meaning of -l in compiler flag, i'm curious.

The definition is: create list file (Preprocess Only) but i don't know what is the meaning of it.
Reply
#2

It precompiles your script and output it as .lst file
It resolves the preprocessor directives (#) and adds some information like #file and #line

Example
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
    
public OnFilterScriptInit() {}
    public 
OnFilterScriptExit() {}
#else
    
main() {}
#endif 
If you leave #define FILTERSCRIPT commented the output would be
PHP код:
// #pragma, sa-mp include ~ 1000 lines, ...
    
main() {} 
Otherwise if you uncomment #define FILTERSCRIPT
PHP код:
//...
    
public OnFilterScriptInit() {}
    public 
OnFilterScriptExit() {} 
Normally it does output the correct code, the only exception I know is if you want to check if a function exists which is defined afterwards
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)