On error...

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Cool 8-)

Please continue :)

--

Esgici
Viva INTERNATIONAL HMG :D
Dilip Patel
Posts: 31
Joined: Tue Aug 17, 2010 6:01 am

Re: On error...

Post by Dilip Patel »

Hi Esgici,
Test program can now print memory variables.
Attached find new modified test program.
Regards,
Dilip
Attachments
tstnew.rar
(802.85 KiB) Downloaded 293 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Dilip Patel wrote: Test program can now print memory variables.
Attached find new modified test program.
Thanks, nice;

memory variables was a hard phase :arrow:

please continue :)

Me too, still continuing to work ;)

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Dilip Patel
Posts: 31
Joined: Tue Aug 17, 2010 6:01 am

Re: On error...

Post by Dilip Patel »

Hi Esgici,
This routine was use by me for testing pupose as well.
I used to create a crash at certain point wihin the program so that i could see the status of the memory variables and also the the dbf files as well.
Regards,
Dilip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Dilip Patel wrote: This routine was use by me for testing pupose as well.
Well :)

What was you talked about "recurse" ?

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Dilip Patel
Posts: 31
Joined: Tue Aug 17, 2010 6:01 am

Re: On error...

Post by Dilip Patel »

Hi Esgici,
HMG was creating its own system variables in memory. Thanks to HMG creating the variables in memory starting with "_" . Therefore everytime the program read the HMG variable, it found and error thereby creating many error files (recursing). I changed the program to bypass the many variable with starting "_". This is not a very good solution. I will keep on trying to find a better solution. If any one on the forum can help, I will be very gratefull. Also I am a novice using HMG, I would appreciate if the screen dump section could be modified. As a suggestion, we could either create a bmp or another format file and reference the file in the error log for later viewing.
Regards,
Dilip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Dilip Patel wrote: HMG was creating its own system variables in memory. Thanks to HMG creating the variables in memory starting with "_" . Therefore everytime the program read the HMG variable, it found and error thereby creating many error files (recursing). I changed the program to bypass the many variable with starting "_". This is not a very good solution. I will keep on trying to find a better solution. If any one on the forum can help, I will be very gratefull. Also I am a novice using HMG, I would appreciate if the screen dump section could be modified. As a suggestion, we could either create a bmp or another format file and reference the file in the error log for later viewing.
Dear Dilip

As far as I know, "_" character at beginning of variable name indicate intentionally to "system" variables. Sadly, some programmers doesn't obey this rule and uses this character at beginning of their own variable arbitrarily.

This "error handling" process is for programmers, no users. If programmers who will use it, will obey this naming rule, no problem will be occurs.

So, IMO your method is correct. People who don't obey rules, will endure the results ;)

In result, no need searching "a better solution"; besides, I can't hope will be such solution.

Regarding "screen dump" : IMHO this will be possible; by embedding a "screen capture" routine into our program, if we find. But we have think: how many necessary this, and will be how many useful. My opinion is : it isn't worth to bother.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Hi Dilip

For bypassing system variables ( begin with underscore ), instead of selecting one to one, we can use a short way :

Code: Select all

SAVE ALL EXCEPT _* TO Errormem 
We have a bigger problem : .mem file structure doesn't support variable names longer than 10 character :(

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Dilip Patel
Posts: 31
Joined: Tue Aug 17, 2010 6:01 am

Re: On error...

Post by Dilip Patel »

Hi Esgici,
Only 10 characters are written out to the memory file. Therefore the RESTORE command will also not work. Who can we inform of this problem? Thank you for informing of the SAVE ALL EXEPT command.
Regards,
Dilip

Attatched is new test file that will print the first 10 characters of the variable and label it as undefined.
Attachments
tstnew.rar
(805.61 KiB) Downloaded 245 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici »

Hi Dilip

Thanks, please continue :);

( I do ;) )
Dilip Patel wrote:...Who can we inform of this problem?...
Please look at here

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Post Reply