1. Now this is very strange

When I run my coronavirus_tracker from within the WEE editor and then
select the projected data routine everything works as expected:

Coronavirus: GA Projected Data based on a 
Daily Growth Rate 7 Day Moving Average of: 1.028 
 
Day     Date        Confirmed       Deaths          Daily 
1       2020-4-30:  26,316          1,132           +31 
2       2020-5-1:   27,053          1,164           +32 
3       2020-5-2:   27,811          1,196           +32 

However; when I run the same program from the terminal

ken@ken-desktop:~/euprogs/Covid_19$ eui coronavirus_tracker.ex 
The first part of my program displays as expected, but when I run
the projected data routine this is what is displayed:

Coronavirus: GA Projected Data based on a 
Daily Growth Rate 7 Day Moving Average of: 1.028 
 
Day     Date        Confirmed       5,777s          +158y 
60      2020-6-28:  134,315 

The same corrupted report is displayed when I compile,bind,shround
and then test run the program. The same thing happens when I include
a SHEBANG line on the programs top line, make the file executable
and then execute the file.

Any suggestions?

Thanks in advance,
Ken

new topic     » topic index » view message » categorize

2. Re: Now this is very strange

Try putting puts(1,"") before you output anything else. I know on Windows there's a weird issue where the text wrapping is limited to 80 characters for the first puts() call. It's really weird, so I'm not sure if it's related to this.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Now this is very strange

ghaberek said...

Try putting puts(1,"") before you output anything else. I know on Windows there's a weird issue where the text wrapping is limited to 80 characters for the first puts() call. It's really weird, so I'm not sure if it's related to this.

-Greg

Thanks for the suggestion. I am on Linux. I tried your suggestion to no avail.

The problem appears to be somehow related to my use of get_position() and position(line,column) to position the display of sequential data in neat justified columns under heading labels. I changed to using tabs which is actually simpler and now the display is as expected under all circumstances.

I still think there is a peculiar bug somewhere though - remember the display routine using get_position() and position() performed flawlessly when the interpreted code was executed from within the editor, but failed except after compiling, shrouding, binding.

I guess all is well than ends well.

Thanks again for your suggestions.

Regards,
Ken

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu