lynx_value_typeof

Introduction

Get the type of lynx_value.

Syntax

lynx_api_status lynx_value_typeof(lynx_api_env env,
                                  lynx_value value,
                                  lynx_value_type* result); 

Parameters

KeyDescription
[in] envThe environment in which lynx value runs, typically nullptr.
[in] valueThe lynx_value whose type to query.
[out] resultThe type of lynx_value.

Return Value

Returns lynx_api_ok if the API succeeded.

Example

lynx_value_type type;
lynx_api_status status = lynx_value_typeof(env, value, &type);
if (status != lynx_api_ok) {
  // handle error.
}
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.