Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
0%
200 - 500 GB
25%
500 - 800 GB
0%
800 - 1200 GB
0%
1200 - 1500 GB
0%
1500 - 2000 GB
75%
> 2000 GB
0%
Total votes: 4

Baanboard at LinkedIn


Reference Content

 
get.indexed.var()
By patvdv at 26 Feb 2008 - 21:57


get.indexed.var()

Syntax

long
get.indexed.var( long processno, "variable", ref variable,
long dim1 [, long dim2, long dim3, long dim4 ] )

Description

This retrieves the value of the specified variable. It is the same as get.var() except that it enables retrieval of individual array elements.

Arguments

processno

The process from which the variable is to be retrieved. You can specify the process ID, or you can use the predefined variables pid or parent.

“variable”

The name of the variable to be retrieved (this must be a lower case string). The variable can be a single variable or an array and must be declared as external. Instead of specifying the variable name, you can specify a variable in which the name is stored.

variable

This stores the value of the retrieved variable or array element.

dim1 to dim4

Use these to specify a particular array element to be retrieved. To retrieve a single variable, set dim1 to 1 and omit the other dim arguments.

Return values

  • 0 success
  • 1 general error
  • 2 incorrect number of dimensions
  • 3 variable not found
  • 4 array element not available

Context

Bshell function.

Example

 extern long ltbl(10,5)
extern string block(10,5,5)

string ret_str(10)
long ret_lng
long e

ltbl(1,1) = 1
ltbl(2,2) = 2
ltbl(3,3) = 3

block(1,1,1) = "The"
block(1,1,2) = "quick"
block(1,2,1) = "brown"
block(1,2,2) = "jumps"

e = get.indexed.var( pid, "block", ret_str, 1, 2 )
| ret_str contains "quick "
e = get.indexed.var( pid, "ltbl", ret_lng, 3, 3 )
| ret_lng is equal to 3

Related topics

0
No votes yet


All times are GMT +2. The time now is 12:24.


©2001-2018 - Baanboard.com - Baanforums.com