[TOC] [Prev] [Next] [Bottom]



<@VARINFO>

Syntax

<@VARINFO NAME=variable ATTRIBUTE=attribute [SCOPE=scope]>

Description

Returns information about variables and accepts three ATTRIBUTE values, TYPE, ROWS, and COLS:

  • TYPE returns either text or array.
  • ROWS returns the number of rows if the variable is an array, or "0" otherwise.
  • COLS returns the number of columns if the variable is an array, or "0" otherwise.

Examples

If the following variable assignments are made:

<@ASSIGN NAME="scalar" SCOPE="user" VALUE="abcdef">
<@ASSIGN NAME="array" SCOPE=user" VALUE="<@ARRAY ROWS='5' COLS='3'>">

<@VARINFO> returns the following values:

<@VARINFO NAME="scalar" SCOPE="user" ATTRIBUTE="type">
(returns "text")
<@VARINFO NAME="scalar" SCOPE="user" ATTRIBUTE="rows">
(returns "0")
<@VARINFO NAME="scalar" SCOPE="user" ATTRIBUTE="cols">
(returns "0")
<@VARINFO NAME="array" SCOPE="user" ATTRIBUTE="type">
(returns "array")
<@VARINFO NAME="array" SCOPE="user" ATTRIBUTE="rows">
(returns "5")
<@VARINFO NAME="array" SCOPE="user" ATTRIBUTE="cols">
(returns "3")

See Also

<@ASSIGN>
<@VAR>
<@VARNAMES>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.