On error...

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

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

Re: On error...

Post by esgici » Fri Jul 27, 2012 6:58 pm

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 » Sat Jul 28, 2012 3:00 pm

Hi Esgici,
Test program can now print memory variables.
Attached find new modified test program.
Regards,
Dilip
Attachments
tstnew.rar
(802.85 KiB) Downloaded 132 times

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

Re: On error...

Post by esgici » Sat Jul 28, 2012 3:06 pm

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 » Sat Jul 28, 2012 3:17 pm

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: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici » Sat Jul 28, 2012 4:09 pm

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 » Sat Jul 28, 2012 9:37 pm

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: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici » Sat Jul 28, 2012 10:34 pm

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: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: On error...

Post by esgici » Sun Jul 29, 2012 1:49 am

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 » Sun Jul 29, 2012 1:13 pm

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 96 times

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

Re: On error...

Post by esgici » Sun Jul 29, 2012 2:32 pm

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