Share this page

# Example: lr_save_var

In the following example, lr_save_var limits the length of a parameter.

    Action()
    {
        #define MAX_NAME_LEN 4

    // Create the parameter, InName
        lr_save_string("Fitzwilliam", "InName");

    // Save the first four characters of "InName" to "ShortName"
        lr_save_var( lr_eval_string("{InName}"),
            MAX_NAME_LEN, 0, "ShortName");

        lr_output_message("ShortName value is %s", lr_eval_string("{ShortName}"));

        return 0;
    }

Action.c(8): Notify: Saving Parameter "InName = Fitzwilliam"

Action.c(10): Notify: Saving Parameter "ShortName = Fitz"

Action.c(12): ShortName value is Fitz

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: