|
benjunmun Beginner
Joined: 23 Feb 2002 Posts: 23
|
Posted: Tue Mar 12, 2002 10:56 pm
Variables |
Is there any way to tell how many things a variable is storing?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Mar 12, 2002 11:55 pm |
A variable stores 1 thing.
Such as 1 number, 1 string, 1 list, 1 database record. Perhaps you are looking to find out how many items are in that one list? That would be %numitems. You might also want to know how many digits are in that one number: %len(%string(@NumericVariable)). Could it possibly be that you seek to know how many words are in that 1 string? That would be %numwords. If it the number of values in that 1 db record then your going to have to ask someone else. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Mar 13, 2002 12:21 am |
Syntax: %numkeys(rec)
returns the number of keys in a database record
TonDiening
Beta Upgrading to 6.26 |
|
|
|
benjunmun Beginner
Joined: 23 Feb 2002 Posts: 23
|
Posted: Wed Mar 13, 2002 3:41 am |
Also, Is there a way to create a temporary variable for just that alias?
|
|
|
|
dracx Beginner
Joined: 14 Oct 2000 Posts: 26 Location: USA
|
Posted: Wed Mar 13, 2002 4:36 am |
What I do is just toss it out when I'm done...
#VAR myvar
<insert code here>
#UNVAR myvar
There may be a more proper way, but it works.
DracX |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Mar 13, 2002 1:47 pm |
Yup, what dracx said. There are no temporary variables, but you can create it and the #UNVAR it. I usually also add a #GAG after #UNVAR so I don't have to see the message that the variable was deleted.
Kjata |
|
|
|
|
|