Archived

This topic is now archived and is closed to further replies.

Formatting text output under Linux.

This topic is 5132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi every-1. It''s me again (since I''ve noticed there were not much posts here, I decided to make a good action...). Does someone know what are the functions under Liux to format the console output (or :"what under Linux replaces gotoxy(int x, int y), clear()" and so on??)?? Thank you all in advance. Prog, Hex & Rock''n''Roll : I don''t like the Prog but the Prog likes me. Some nice poetry to sweeten your spirit and relax a bit before programming

Share this post


Link to post
Share on other sites
I think you might want the ncurses library. It probably comes with your linux distribution. To use #include <curses.h> The man page is ncurses(3x).

Share this post


Link to post
Share on other sites
Thnak you buddy. Actually I had already been told about ncurses.h but I hadn't been able to look it properly. Now I've found almost everything I needed (escpecially, for those who'd be looking for the same things, delay_output(ms) to asleep the console, or move(y,x) and things like those).
Thank you again and LONG LIFE TO GAMEDEV.NET !!!!!!!!!

Edit: note that contrarily to what I had previously written, move takes as parameters first y and then x. Although I don't get why, I've just noticed this while testing how functions worked. Regards.

Prog, Hex & Rock'n'Roll :
I don't like the Prog but the Prog likes me.
Some nice poetry to sweeten your spirit and relax a bit before programming

[edited by - kurtcpp on November 28, 2003 8:23:37 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by KurtCPP
note that contrarily to what I had previously written, move takes as parameters first y and then x. Although I don''t get why, I''ve just noticed this while testing how functions worked. Regards.



move takes the line first and the column after, line is according to the y axis and column is the x axis

hope that helps
Matt

Share this post


Link to post
Share on other sites
OK, I've gotten the reason. Thanks for the tip. ;-)

By the way, I had to say that programming under Linux is realy awesome. I currently study in an establishemnt (an IUT ie Institut Universitaire de Technologie) where most (all but two sheeps) students love Linux (please tell me whether I must pronunce this L nux or merely Li nux) and hate all about Microsoft. When I arrived, I couldn't even use Linux but now i'm fond of it. But at the beginning, I thought programming w/o IDE was a chore because of complicated makefiles and the lack of word completion, but now, I see that I've got almost everything of the IDE by simply using Emacs or even Kate or at least KWrite (I even code in Vi for fun sometimes, that's too cool !!!!!!! lol).
But still, Isn't there a way to get the word completion (I don't beg for it out of mere laziness but cuz it's really useful when you don't have real help files [man cmd is barely enough]) and it enables finding functions even when you can only assume what their names look like. I suppose I can write a kind of parser associated with something that reads in the header files to find what I need, can't I??
And how about makefiles? Could someone indicate me an URL where there's a tut' about this or even gimme the basics of using them?
thank you in advance.

Prog, Hex & Rock'n'Roll :
I don't like the Prog but the Prog likes me.
Some nice poetry to sweeten your spirit and relax a bit before programming

[edited by - kurtcpp on November 28, 2003 8:53:53 AM]

[edited by - kurtcpp on November 28, 2003 8:55:50 AM]

Share this post


Link to post
Share on other sites
quote:

(please tell me whether I must pronunce this Laï nux or merely Li nux)

as linux is not native english speaking the proper way to pronounce it would be "lihnucks"

btw as far as i know there should be sound samples of linus how to pronounce it correctly


word completition:
dont know for other editors but kdevelop has it (not as good as msvc but useable)

manuals:
you could try ''devhelp''. it has even a search function so it works somehow like the chm format on windows, although i still havent founs a stl/libstdc++ book for it.

makefiles:
Google is your friend

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Just to make it a little clearer.

row,column is the coordinate system used.

row corresponds to y, and column to x

so y,x

Share this post


Link to post
Share on other sites