DynArray problem Pdox DOS

DynArray problem Pdox DOS

Post by Jan Theo Bakk » Wed, 02 Nov 1994 23:30:46



Does anyone know a fast way to determine whether an element of a
dynamic array does NOT exist? IsAssigned and Not IsAssigned are not
enough I think, because no difference is made between the presence
of an element and the contents of the element. Also, combinations with
isblank etc. don't work. They result in a cancel/debug BECAUSE the
element does not exist. Only thing I think of is a FOR-loop over the
array.

Thanks,

Jan Theo

 
 
 

DynArray problem Pdox DOS

Post by DCarl » Fri, 04 Nov 1994 09:39:11



Quote:(Jan Theo Bakker) writes:

A combination in the right order should work for you. I'm not sure if
you've given enough info but try:

IF NOT ISASSIGNED(myArray["SomethingHere"]) OR
        ISBLANK(myArray["SomethingHere"]) THEN
   ..........;Code here if dynarray is not assigned or is blank
ENDIF

Does this not work for you?


Can* Corporation

 
 
 

DynArray problem Pdox DOS

Post by ABrons » Fri, 04 Nov 1994 13:06:12



Quote:(Jan Theo Bakker) writes:
>Does anyone know a fast way to determine whether an element of a
>dynamic array does NOT exist? IsAssigned and Not IsAssigned are not
>enough I think, because no difference is made between the presence
>of an element and the contents of the element. Also, combinations with
>isblank etc. don't work. They result in a cancel/debug BECAUSE the
>element does not exist. Only thing I think of is a FOR-loop over the
>array.

The isassigned function is *exactly* the way to do it, as in
isassigned(dynarray["tag"]). This works because there is no way to create
a dynarray element without also assigning it a value, so the problem you
speak of does not exist.

--Aaron

 
 
 

DynArray problem Pdox DOS

Post by FrontM » Fri, 04 Nov 1994 22:08:02



Quote:(Jan Theo Bakker) writes:

Does anyone know a fast way to determine whether an element of a
dynamic array does NOT exist? IsAssigned and Not IsAssigned are not
enough I think, because no difference is made between the presence
of an element and the contents of the element. Also, combinations with
isblank etc. don't work. They result in a cancel/debug BECAUSE the
element does not exist. Only thing I think of is a FOR-loop over the
array.
=========================
ISASSIGNED & ISBLANK are it, but can be used effectively.  ISASSIGNED will
return false if the element has not been assigned at all (does not exist),
but will return True if the element exists but is blank.  ISBLANK can then
be used to determine the status of its contents -- I do it all the time.
So you might use:

  IF ISASSIGNED(X["This One"]) AND NOT ISBLANK(X["This One"])
     THEN DO_THIS_THING
  ELSE
     IF ISASSIGNED(X["This One"])
         THEN DO_THAT_THING
  ENDIF

DR

 
 
 

1. PDOX 4.0 for DOS and PDOX for Windows

I cut my database teeth on Paradox for DOS but am now having to enter
the Windows era.  Unfortunately, the newer versions of  Paradox for
Windows (7, 8, 9) do not have the ability to record scripts from key
strokes and mouse clicks as was possible in the DOS versions.  I found
this old feature very useful for quickly producing scripts and for
learning the syntax and commands of PAL.  Are there any early Windows
versions of Paradox that retain the Record Script feature and is there
any place I can get copies of the program and manuals?  If so, it would
be of immense value to me while I'm on the steep part of the learning
curve with ObjectPAL.

Many thanks for any help that you can provide.

Randy Linder

2. Forced to Strictly SQL ... YUCK!

3. PDOX 4.5 DOS to PDOX 8 WIN95....?

4. LONDON - Sybase Server Development - Unix/CShell Scripting - Equity Derivatives - Front Office - £30k to £50k + to 30%

5. ADO and Oracle BLOBs

6. PDOX DOS programmer needs help understanding PDOX 7

7. Incorrect Query results - Urgent

8. DOS PDOX 3.5 conversion to PDOX WINDOWS, Need conversion Utilites

9. PDOX 7-EXECUTING DOS BATCH FILE FROM PDOX FORM

10. Question: pdox(dos) vs. pdox(win)

11. pdox(dos) vs. pdox(win)

12. PDOX DOS .SC -> PDOX 4.5 WINDOWS