forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PACK function
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Martin_K



Joined: 09 Apr 2020
Posts: 224

PostPosted: Sun Mar 07, 2021 11:46 pm    Post subject: Reply with quote

I did it. The videos can be downloaded here (their play lengths are about 35s):
https://www.dropbox.com/s/prz8sck5je7b4a8/debug_videos.zip?dl=0

I am even more confused now.

Couple of observations:

DEBUG/x64:

There are two videos.
The first run of debugger/x64 ends with error message:
ACCESS VIOLATION AT ADDRESS ...
I immediately run it once again and the second run ends with error message: Heap corruption.

I have a variable named BOTTOM and it is initialised as equals ZERO.
However, during debug process, when pointing the cursor over it on the line where BOTTOM=0 is declared, the debugger shows the value of 2 for it (this is clearly showed in the second video).

DEBUG/x32:
There is one video. During the debugging, the debugger shows for the variable of D array and UPPER variable totally wrong values when pointing the cursor over them during debugging.

I have no idea where is the problem.
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 960
Location: Morrison, CO, USA

PostPosted: Mon Mar 08, 2021 5:55 am    Post subject: Reply with quote

I ran across a few limitations with PACK.

I found that it is best if one does a COUNT to get the number of elements that will be returned, then use that on the left hand side of the equal to have the number of elements specified more precisely.

I was having (with 32-bit) a crash (sometimes). This little "trick" cured the problem.

Since what I was doing is not something done repetitively, the additional time to do the COUNT operation was trivial enough. Preventing a crash was priceless!
Back to top
View user's profile Send private message Visit poster's website
Martin_K



Joined: 09 Apr 2020
Posts: 224

PostPosted: Mon Mar 08, 2021 12:51 pm    Post subject: Reply with quote

At the beginning I used the COUNT function. But I abandoned it since it does not provide information what I wanted - the COUNT provides me only information,
how many different sections of points with the same feature code are available in the input data set (see picture below - the data with the number 20).



I get this information (how many different sections are available) by using a complex DO LOOP in my program.
The function PACK provides me the particular information HOW MANY points with the same feature code
are available within EVERY section, in which the points have the same feature code (see the picture below in yellow).


And this is what I need to know for next complex DO LOOPS which differ
each other with respect to the numbers provided by PACK. This DO LOOPS has also consequences for next DRAW_POLYLINED@ function, since
they (the numbers provided by PACK) determine which section of points are to be joined. The reason for it is to avoid zick-zack joining
when using %PL with the option LINK=LINES which also creates unwanted joining (across sections of points,
whereas every section should be isolated - it means, not connected by joining its points with the other one).
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 960
Location: Morrison, CO, USA

PostPosted: Mon Mar 08, 2021 5:14 pm    Post subject: Reply with quote

Thanks for the explanation.

I have no help for your issue, sorry!
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6836
Location: Salford, UK

PostPosted: Sat Apr 10, 2021 2:36 pm    Post subject: Reply with quote

The missing parts of "allocate on assignment" described above have now been added for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group