Share this page

# Example: lrc_Get<Type-Name>ArrayFromVariant

This example gets a float array from a variant:

    {
        FloatArray array1;
        FloatArray array0;
        VARIANT var;
        array1 = 0;
        array0 = Create1DFloatArray(0, 5);
        PutElementIn1DFloatArray(array0, 0, lrc_float("1.1"));
        PutElementIn1DFloatArray(array0, 1, lrc_float("20.02"));
        PutElementIn1DFloatArray(array0, 2, lrc_float("300.003"));
        PutElementIn1DFloatArray(array0, 3, lrc_float("4000"));
        PutElementIn1DFloatArray(array0, 4, lrc_float("50000"));
        var = lrc_variant_FloatArray_by_ref(array0);
        array1 = lrc_GetFloatArrayFromVariant(&var);
        return 0;
    }

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: