How to determine a function existance
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
How to determine a function existance
Hi
How to determine in Clipper program that a specified by a user function (for example through GET command) exists?
I.e. a user inputs a macro expression containing function name &SomeUDF and there is a need to determine does exist a function with name SomeUDF() or does not.
Vladimir Grigoriev
How to determine in Clipper program that a specified by a user function (for example through GET command) exists?
I.e. a user inputs a macro expression containing function name &SomeUDF and there is a need to determine does exist a function with name SomeUDF() or does not.
Vladimir Grigoriev
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
Antonio
Yesterday I tested a simple code and got the following results.
UI UI UE UE U U UE
The last result "UE" destroys all concept to use TYPE( cExp ).
Vladimir Grigoriev
Yesterday I tested a simple code and got the following results.
Code: Select all
PROCEDURE MAIN()
? TYPE( "DEFINED()" ), TYPE( "2 + DEFINED()" )
? TYPE( "DEFINED() + ABS()" ), TYPE( "ABS()" )
? TYPE( "UNDEFINED()" ), TYPE( "2 + UNDEFINED()" )
? TYPE( "ABS() + UNDEFINED()" )
RETURN
FUNCTION DEFINED()
RETURN ( NIL )
The last result "UE" destroys all concept to use TYPE( cExp ).
Vladimir Grigoriev
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
- Badara Thiam
- Posts: 160
- Joined: Tue Oct 18, 2005 10:21 am
- Location: France
- Contact:
Type() return the type of an expression by evaluate the expression.
You want to know if a function is linked in your executable ?
In this case, you can use Error system to intercept the error
returned if you do something like this :
************
function Test()
************
local cFunction := "MyFunc"
begin sequence
&(cFunction)()
end
When a function is not present in the exe, the error number
is always the same...
Regards,
You want to know if a function is linked in your executable ?
In this case, you can use Error system to intercept the error
returned if you do something like this :
************
function Test()
************
local cFunction := "MyFunc"
begin sequence
&(cFunction)()
end
When a function is not present in the exe, the error number
is always the same...
Regards,
Badara Thiam
http://www.icim.fr
http://www.icim.fr
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 54
- Joined: Fri Oct 21, 2005 10:45 am
- Location: Russia, Moscow
- Contact: