Deep Assignment 
Author Message
 Deep Assignment

Hi Joachim,

Quote:
>When doing a deep assignment via :=:, I get an "Internal error 07:
> Parameter typing error" message.

>Question is: why??

1. Your destination LEFT side must be a GROUP, RECORD, or QUEUE, yours was an
array of USHORTs.

Stack:ParamPos :=: ParamPos ! produces error
BECAUSE Stack:ParamPos is not a structure

2. Even if you made the destination, the QUEUE, you would have to change the
field (queue) name to match the ParamPos array exactly, or no assignment would
be made, but also in this case no error either.

ScriptStack              QUEUE,PRE()
Stack:File                 STRING(128)
Stack:Parameters           CSTRING(32000)
ParamPos                USHORT,DIM(20)  ! for the assigment to work
Stack:Position             LONG
Stack:LineNr               LONG
                         END
Parameters               STRING(32000)
ParamPos                 USHORT,DIM(20)

TRY: ScriptStack :=: ParamPos

Best Regards,

Andy Kaczmarczyk
Auratek International



Sat, 20 Feb 1999 03:00:00 GMT  
 Deep Assignment


Quote:
>Hi all,

>When doing a deep assignment via :=:, I get an "Internal error 07: Parameter
>typing error" message.

>Question is: why??

>The code is as follows:

>ScriptStack              QUEUE,PRE()
>Stack:File                 STRING(128)
>Stack:Parameters           CSTRING(32000)
>Stack:ParamPos             USHORT,DIM(20)
>Stack:Position             LONG
>Stack:LineNr               LONG
>                         END
>Parameters               STRING(32000)
>ParamPos                 USHORT,DIM(20)
>...
>  Stack:Parameters = Parameters ! works
>  Stack:ParamPos :=: ParamPos ! produces error

>I know I can assign the array element-wise (and I will do that), but still
>I'm wondering what is going on here...

>Curiously enough, a simple assignment with = will work.

Joachim,

How about

        ScriptStack :=: ParamPos

I was under the impression that the deep assignment was intended to assign
*similarly named* objects without direct reference.  Just a thought.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -

 Custom Business Applications & System Level Utilities since 1967
 *** If you can imagine it, we can automate it ! ***



Sat, 20 Feb 1999 03:00:00 GMT  
 Deep Assignment

Rob,

  Hi, you are correct.

--
Ross A. Santos (RAS)

X-Generation Software
http://www.x-gen.com



Quote:
> I was under the impression that the deep assignment was intended to
assign
> *similarly named* objects without direct reference.  Just a thought.



Sat, 20 Feb 1999 03:00:00 GMT  
 Deep Assignment

Quote:
>I tryed it, but did not reproduce the error

What did you try?

Quote:
>I notice that you have a big local variable - is your stack large
>enough?

Big local variables are moved to the heap. The stack only stores a reference
to the variable's address. The de{*filter*} will show what is going on behind
the scene in this case.

Quote:
>Note: I think you can use references to reduce stack requirements
>nowadays - you need to call NEW/DISPOSE etc.

Not with 1.501.

Regards,
-Joachim
-----------------------------------------------------------------------
Joachim Durchholz, +49(9132)82-3150, speaking for himself, not for INA.
KOA, INA Werk Schaeffler, Industriestr.1-3, D-91074 Herzogenaurach



Sat, 20 Feb 1999 03:00:00 GMT  
 Deep Assignment

Quote:

>>I tryed it, but did not reproduce the error
>What did you try?

Well I tried with 2.0 - maybe it is fixed in 2.0

Quote:
>>I notice that you have a big local variable - is your stack large
>>enough?
>Big local variables are moved to the heap. The stack only stores a reference
>to the variable's address. The de{*filter*} will show what is going on behind
>the scene in this case.

Oh! That should teach me to comment on things I don't know much about.
Well I have learnt something, thanks Joachim.

George



Sun, 21 Feb 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Deep Assignments - How?

2. Deep Assignment (:=:)

3. deep assignment

4. Deep assignment

5. Has deep assignment changed?

6. ABC newbie: How do I use deep assignment to copy records

7. Deep assignment

8. Deep Assignment

9. Deep Thoughts by Jack Handey (Req CW15 to run) - deep.zip (2/2)

10. Deep Thoughts by Jack Handey (Req CW15 to run) - deep.zip (1/2)

11. No Assignment in Conditional/PROPOSAL: Assignment expression

12. Dolphin deepCopy, seems deeper than I thought?

 

 
Powered by phpBB® Forum Software