1. Windows display questions

I don't resort to the forum until after lots of experimenting and manual research, but I am stumped. My program (which worked beautifully 20 years ago using DOS) sends 62 different character strings to locations in a tree shape on the screen, using position() and printf().

Now using Euphoria 4.1.0 in Windows 10, my partial program runs with a brief flash of the screen, too quick to see what's happening. I tried adding key_code = wait_key to the end, but to no avail. I have three questions:

1. Is position() still an appropriate way to determine where the printf() output will be?

2. Why doesn't wait_key() cause the screen to wait for me to see the screen?

3. How can I prescribe the size of the screen that is used?

4. Is there also a way to prescribe a larger screen for the ed editor?

new topic     » topic index » view message » categorize

2. Re: Windows display questions

Additional info:
running vc = video_config in a test program reveals:

color monitor,
video mode 3,
screen width and height both 0 pixels ! !,
text rows in both console buffer and current screen size set for 25
text columns in both console buffer and current screen size set for 80.

No clue as to how to change screen size.

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

3. Re: Windows display questions

eui vs euiw on windows

  • use the eui interpreter when you want to see the console
  • use the euiw interpreter when you want the console to be invisible (it is intended for graphical programs that do not use the console)

? video_config()

  • if you are in "text" mode, then there are no individual pixels (hence pixel count is zero 0)

position()

  • will place the cursor where you want it
include std/console.e 
integer rows = 50  -- the maximum rows under windows 
? text_rows( rows) 

Your choices are 25, 28, 43 and 50 lines for most systems.

check out the WEE editor https://github.com/peberlein/WEE

in the text based "edx.ex" editor (renamed from ed.ex)

  • esc l for ( escape lines)

gives you a choice of line numbers under windows


gentle suggestion, try Linux Mint

  • you can have a text screen the full size of your monitor
  • you can set a small font to get even more stuff on the screen
  • edx can work full screen

_tom

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

4. Re: Windows display questions

If you open a cmd.exe window (click windows icon on lower left of screen and type cmd <enter>) then you can right-click on the top left corner of the terminal, and choose properties, then layout, and change the number of characters width/height. If you use more than will fit on the screen, there will be a scroll bar at the bottom to slide back and forth.

I believe that the Eu editor can be changed to show more lines/chars, but a simpler, better suggestion is in order: use the great WEE editor! It's Euphoria-specific, written in Euphoria, and makes things much, much easier.

As tom said, however, you're working under a handicap - known as Windows. Everything is harder and slower with Windows 10.

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

5. Re: Windows display questions

Thanks Tom and Irv. The computer world has moved way beyond me in the last twenty years. Words like Ubantu and LMDE leave me with big question marks (maybe Linux Mint Development Environment?). I have looked up Linux Mint and think I can use a USB drive to bypass my windows operating system if I can figure out how to boot from the USB. The following is copied from the Installation section on Wikipedia.

"Linux Mint can be booted and run from a USB flash drive on any PC capable of booting from a USB drive, with the option of saving settings to the flash drive. A USB creator program is available to install an Ubuntu (but not LMDE) Live Linux Mint on a USB drive."

I will also move to the other editor.
I have been using eui but still could not see any display.
Any hint as to why the system didn't wait for wait_key? Key buffer not empty?

I look forward to moving to Linux, and thanks again for the suggestions.

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

6. Re: Windows display questions

Hi

This is a bare minimum for what you are describing

--Example bare minimum console program 
--does not work with euiw.exe, use eui.exe 
 
include std/console.e   --for wait_key() 
 
object VOID		--can dump anything in here 
 
system("mode 100,50", 0) --change the console size on the fly 
puts(1, "Resized\n") 
 
VOID = wait_key() 
 
position(10,10) 
puts(1, "Good to go\n\n") 
 
VOID = wait_key() 

Also, as far as Linux goes, a great OS to fiddle with and I'm a great advocate of Linux, but IMHO you'll get very distracted from your tree program - stick to Windows.

Cheers

Chris

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

7. Re: Windows display questions

First of all, any OS running from a usb drive (or from a CD) is going to be slow, therefore frustrating and not a fair comparison. So forget that.

I agree with Chris; Installing Linux, while extremely easy compared to re-installing Windows, would just be something else to distract from getting your program working. In the future, however, Linux is far superior to Windows as a development environment. It comes with all the tools needed, for free, without the frustrations of dealing with Windows 10. Keep that in mind for later.

One of the great things about programming with Euphoria is the ease of debugging. If you think wait_key() isn't working, it's simple to add a line before and a line after the wait_key() call to print something that tells you your program actually got to that call, and if so, if wait_key() actually waited. e.g:

puts(1,"Before wk\n") 
? wait_key() 
puts(1,"After wk\n") 

If you don't see the Before, then your program never got there, and you have to figure out why. Otherwise, you should see something like the following, if you hit the <enter> key:

Before wk 
13 
After wk 

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

8. Re: Windows display questions

Many thanks again to Chris and Irv for their help and great suggestions. I'm sure you are correct about switching to Linux being a great distraction and delaying the resurrection of my tree program, but there are other considerations.
My current disk drive is roughly 5 years old and living on borrowed time. I intend to switch to SSD. I want to have Linux available on the SSD after the change is made. After 20 years, the tree can wait on some very important changes. Threading my way will be difficult, and maybe even treacherous, but I expect my sons to help. I was disappointed to find that SSD life is limited by re-write effects on individual storage elements, but it seems that they are still more reliable than HDD over the long run.

Any advice on SSD's or Linux options?

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

9. Re: Windows display questions

You can run Linux from a USB Drive and be happy.

I have started a new topic on installing and running Porteus Linux. All you will need is a USB Drive and the ability to tinker with the computer bios so you can boot from it. You will not have to alter your existing Windows OS.

This way you can decide if Linux is truly compatible with the way you think.

I have SSD drives on all my computers. Actually, Windows will eat SSD drives faster than Linux because Microsoft writes perverse logs continuously (and then downloads everything back to Microsoft). You do not have to spend a lot of money to get the largest and fastest drive; put the OS on the SSD and use a hard drive (I use external drives) to keep your files. I always buy external USB drives in pairs; the second one is used to backup everything on the first drive. My "obsolete" netbook from ten years ago is still working just fine.

Using Porteus I can open a terminal that was 54x200 instead of the default 24x80.

You can use Porteus to demo oE and Phix; and then move on to a proper installation.

_tom

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

Search



Quick Links

User menu

Not signed in.

Misc Menu