LR Parameters and variables

Source: Internet
Author: User

The parameters in LR are used by default in the LR parameter "{}" to indicate, if you want to modify, you can then General Options/parameterization the function used to set the boundary character of the parameter Shihing: lr_save_string ("string", parameter name), save string as argument ·voidLr_save_datetime (Const Char*format,intOffsetConst Char*name); Save the time date as a parameter ·intLr_save_init (intValueConst Char*param_name), the integer is saved as a parameter lr_param_sprintf (), a certain format is written as a parameter lr_param_increment (), for the number of parameters stored in an example:intindex=2;Char* suffix=" txt"; lr_param_sprintf ("Log_name_param","log_%d.%s", Index,suffix, -) Lr_output_message ("The new file name is%s", Lr_eval_string ("{Log_name_param}") ; output result: theNewFile name isLog_2.txt The use of variables in LR can be defined directly in LR, but must be defined before system functions (that is, before all LR functions):intor Char name[ -] Three, the difference between variables and parameters1, scope parameters are global, the scope of the variables needs to be declared in the Globals.h file can be global scope2, the use of parameters in LR can be directly applied in the system function, the variable is a C language cannot be directly applied in the system function example: variable notation:Charurl[ -];strcpy (URL,"url=www.baidu.com") Web_url ("Baidu", url,last); parameter notation: lr_save_string ("www.baidu.com", URL) web_url ("Baidu","Url={url}", last); parameter array • Parameter array must begin with the same parameter name, followed by an underscore and a number in the order of the sequence of arguments • The parameter array must have a"parameter name _count"parameter to record the length of the array in the array of parameters frequently used in the function: Lr_paramarr_idx (): Take out a number in the parameter array value, you can also use LR_EVAL_STIRNG ("{parameter name _ number}") Lr_paramarr_len (): Gets the length of the parameter array, or you can use Lr_eval_string ("{parameter name _count}") Lr_paramarr_random (): Get a random value in the parameter array

LR Parameters and variables

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.