Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #5048 > unrolled thread

Funtion to check if a variable exists.(run time)

Started byBGeorge <bgeorge21@in.gr>
First post2013-04-13 07:10 -0700
Last post2013-04-14 20:44 +0200
Articles 6 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Funtion to check if a variable exists.(run time) BGeorge <bgeorge21@in.gr> - 2013-04-13 07:10 -0700
    Re: Funtion to check if a variable exists.(run time) "Jamal" <jamal@examples.net> - 2013-04-13 19:48 -0400
      Re: Funtion to check if a variable exists.(run time) BGeorge <bgeorge21@in.gr> - 2013-04-14 09:52 -0700
        Re: Funtion to check if a variable exists.(run time) "Jamal" <jamal@examples.net> - 2013-04-15 12:03 -0400
        Re: Funtion to check if a variable exists.(run time) Massimo Bighelli <info@arcasistemi.it> - 2013-04-15 18:09 +0200
    Re: Funtion to check if a variable exists.(run time) "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-04-14 20:44 +0200

#5048 — Funtion to check if a variable exists.(run time)

FromBGeorge <bgeorge21@in.gr>
Date2013-04-13 07:10 -0700
SubjectFuntion to check if a variable exists.(run time)
Message-ID<832dabac-7ed5-4e5f-9403-8d0da3a36e0b@googlegroups.com>
I want to check if a variable exists in runtime.

[toc] | [next] | [standalone]


#5049

From"Jamal" <jamal@examples.net>
Date2013-04-13 19:48 -0400
Message-ID<kkcqsq$9k7$1@speranza.aioe.org>
In reply to#5048
You don’t say much!

What are you trying to accomplish?

What kind of variable? Are you dealing with classes? Objects, instances of a 
class (protect, export, etc)? or are you dealing with macros?

There are several VO functions (in the IS...() category) that will help you, 
for example: IsInstanceOf( ) and others like MemVarGet(), etc.

You can also use an ErrorBlock, and check Error Code 14 (Variable Does not 
Exit).

Jamal


"BGeorge"  wrote in message 
news:832dabac-7ed5-4e5f-9403-8d0da3a36e0b@googlegroups.com...

I want to check if a variable exists in runtime. 

[toc] | [prev] | [next] | [standalone]


#5050

FromBGeorge <bgeorge21@in.gr>
Date2013-04-14 09:52 -0700
Message-ID<f46a5cdc-a9f6-41f8-96fa-64f70ec70c26@googlegroups.com>
In reply to#5049
Sory Jamal!!!
I want to check if a LOCAL variable exists.

[toc] | [prev] | [next] | [standalone]


#5059

From"Jamal" <jamal@examples.net>
Date2013-04-15 12:03 -0400
Message-ID<kkh8c4$kpi$1@speranza.aioe.org>
In reply to#5050
LOCAL variables are checked for existence at "compile time" and you will not 
be able to create an application unless you resolve the errors first.

Jamal

"BGeorge"  wrote in message 
news:f46a5cdc-a9f6-41f8-96fa-64f70ec70c26@googlegroups.com...

Sory Jamal!!!
I want to check if a LOCAL variable exists. 

[toc] | [prev] | [next] | [standalone]


#5060

FromMassimo Bighelli <info@arcasistemi.it>
Date2013-04-15 18:09 +0200
Message-ID<kkh8n0$l6a$1@speranza.aioe.org>
In reply to#5050
Il 14/04/2013 18:52, BGeorge ha scritto:
> Sory Jamal!!!
> I want to check if a LOCAL variable exists.
>

in addition to what Jamal said
be carefull if you are building a CodeBlock with LOCAL inside...

*Massimo Bighelli* ARCA Sistemi S.r.l.

[toc] | [prev] | [next] | [standalone]


#5055

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2013-04-14 20:44 +0200
Message-ID<at0bnuFd5qhU1@mid.individual.net>
In reply to#5048
Hi George,

> I want to check if a variable exists in runtime.

AFAIK there is no easy possibility to check this.

For private and public variables you can check with
_PublicFirst/_PublicNext and _PrivateFirst/_PrivateNext.

To check if an object has a given instance variable,
IVarGetInfo()/IVarPutInfo() is your friend.

I you need to check if a parameter is passed, you can check with
IsNil().

Local variables are resolved at compile time, so IMHO a check cannot
work.

What dou you are trying to accomplish?

Wolfgang



-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web