Re: stdout not working as expected under "cmd" in Windows XP

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
eujeth said...

I've created an extremely simple Euphoria program that looks like this:

C:\EUPHORIA\DEMO>type b1.ex
puts(1, "this is a test\n")
printf(1, "%s", "this is another test\n")

I run "cmd" under Windows XP, set PATH and EUPATH correctly and then try to "ex b1.ex":

Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>cd c:\EUPHORIA

C:\EUPHORIA>set PATH=%PATH%;C:\EUPHORIA\BIN

C:\EUPHORIA>set EUPATH=C:\EUPHORIA

C:\EUPHORIA>cd DEMO

C:\EUPHORIA\DEMO>ex b1.ex
this is a test
t
C:\EUPHORIA\DEMO>

Why am I not seeing the two sentences I'm outputting? The same happens when running under "command" instead of "cmd".

Try this:

puts(1, "this is a test\n")
printf(1, "%s", {"this is another test\n"})

Ahhhhh... *now* get it. Thanks!

(Possibly) related questions:

1) Where does stdout go when I run my program under exw instead of ex (again, from within a cmd window)? What am I not understanding about the difference between ex and exw? Is exw *only* for running a program which does Windows graphics?

2) Back to "ex b1.ex"... it works fine in a "vanilla" cmd window. But if I mess with the "color" subcommand at all under cmd, then my Euphoria program prints the right number of characters, but they're "solid black background" (i.e. you can't see the characters themselves because they're foreground black in background black)... to see them I need to run "color", and that magically turns off the background color for what was just output. Not sure what's going on, there.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu