Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
cout << "?" available? #287850
09/02/09 20:18
09/02/09 20:18
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
Is there an equivalent to
the C++

cout << "Hello world";

statement,
so that I can directly give out
messages in the SED console?

printf can only display the messageboxes,
how about a continious console output?

Re: cout << "?" available? [Re: Damocles_] #287856
09/02/09 20:46
09/02/09 20:46
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
don't know if this will do it for you but try this.
VC 2005 Express

Code:
#include<Windows.h>
#include<stdio.h>
#include<io.h>
#include<fcntl.h>
#include<conio.h>
void SCRprintf( const char* x)
{
    va_list args;
    va_start( args, x );
    vprintf( x, args ); 
    va_end( args );
}




Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: cout << "?" available? [Re: Nidhogg] #287863
09/02/09 21:21
09/02/09 21:21
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
I need to see if I can find the headers to include.

Code:
Error in  'MAIN' line 9: Include file io.h not found
< #include<io.h>
 >
Error in  'MAIN' line 10: Include file fcntl.h not found
< #include<fcntl.h>
 >
Error in  'MAIN' line 11: Include file conio.h not found
< #include<conio.h>
 >



Re: cout << "?" available? [Re: Damocles_] #287878
09/03/09 00:22
09/03/09 00:22
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
I doubt this will work... other than adding the variable to track in SED self and run the debug version, I don't think you can write anything to SED immediately.

Last edited by Joozey; 09/03/09 00:23.

Click and join the 3dgs irc community!
Room: #3dgs
Re: cout << "?" available? [Re: Joozey] #287879
09/03/09 00:27
09/03/09 00:27
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
You could write an external console app, that keeps track of a txt file and outputs when it has been updated. You could then just use file IO in lite-c to update the text file, and then view the result in the external app.

Re: cout << "?" available? [Re: DJBMASTER] #287950
09/03/09 11:49
09/03/09 11:49
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
It would be a useful feature for development in Lite-C
to open an extra Console-Window for Logging output.

Its better than having to write an on-screen logger.

I mean its standard to use some system-output during development.
(In Java or C++) simply to have to code pop up outputs
at certain codepositions.

I personally never use a debugger, as this method can
find bugs even quicker, than stepping though code.

Re: cout << "?" available? [Re: Damocles_] #288005
09/03/09 15:32
09/03/09 15:32
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Here is a quick sample i wrote that shows my 'external app' concept. I've made a function called Cout() that allows you to write to the console window...

http://www.djbm.kawanda.net/Lite-C_Console.zip

Re: cout << "?" available? [Re: DJBMASTER] #288013
09/03/09 16:14
09/03/09 16:14
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
Thanks, its a helpful app.

Maybe you could develop this further to
a full logger prog.

(with alternative functions to write variables + Strings mixed)

Re: cout << "?" available? [Re: Damocles_] #288015
09/03/09 16:19
09/03/09 16:19
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Originally Posted By: Damocles_
I personally never use a debugger, as this method can
find bugs even quicker, than stepping though code.


I quite disagree with that. With a debugger you don't have to code additional lines of output and furthermore you can add variables to be watched in debug mode. No need to rerun the program.

But I'm speaking of good debuggers here, like the one for Visual Studio. I never made up with the one SED provides.

Re: cout << "?" available? [Re: Damocles_] #288037
09/03/09 18:26
09/03/09 18:26
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Originally Posted By: Damocles_
Thanks, its a helpful app.

Maybe you could develop this further to
a full logger prog.

(with alternative functions to write variables + Strings mixed)


You can easily accomplish this by using file_var_write. All that LCConsole.exe does is watch that .txt file, and when it is changed it displays the output. So you can use any GS function to modify the .txt file, and it will be displayed in the console.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1