WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

UDF - UDS Library
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

VarTypeEx to Detect Pointer Variables

 Keywords: VarType VarTypeEx Type Pointer Variables

Question:

Right now, some of my routines take a parameter that may, or may not, be a pointer. I'm detecting this with
if strsub(parameter,1,9)=='#VAR$PTR#'
Which works fine, but seems clunky. Is there a better way?

I respectfully suggest that VarType be extended to report pointer-ish-ness. I realize they are strictly speaking just strings, but nevertheless a test seems possible and useful.

Answer:

That is a great suggestion. I will forward this request to our developers.

This works until/if a native solution comes along.

#DefineFunction VarTypeEx(a)
  If VarType(*a)>=0 Then  Return 2048+VarType(*a)
  Else                    Return      VarType( a)
#EndFunction


Article ID:   W18338
Filename:   VarTypeEx to Detect Pointer Variables.txt
File Created: 2009:06:23:09:33:32
Last Updated: 2009:06:23:09:33:32