Example: lr_save_int

In the following example, lr_save_int assigns the string representation of the value of variable num times 2 to parameter param1.

    int num;
    num = 5;
    lr_save_int(num * 2, "param1");
 

The value of param1 is now "10".

In the following, example, lr_save_int is used to get the seconds from a timestamp into a parameter.

    long t;
    time(&t);
    lr_save_int(t, "secondsTimeStamp");
    lr_output_message("Seconds: %s", lr_eval_string("{secondsTimeStamp}"));
    // Output: Action.c(6): Seconds: 1416228733