Thread: Faster way of printing to the screen

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Adak View Post
    I have a lot of old Turbo C/C++ programs that I'm now porting over to VS C++, and these "legacy" factors, do come into play.
    I'm sure you have to battle with it, but you keep bringing it up to others, about using Turbo C/C++ and presenting a lot of old code.
    Not usually a good thing.

    Note that the OP brought up direct video access, himself:
    I mentioned direct video writing, because he asked specifically about it.
    I also mentioned that it didn't work today, afaik, and suggested he put his data to be printed into a string in RAM, and print it out with puts().
    You also mentioned a whole lot of other things like
    In QuickBasic, CLS works, but only for part of the screen, now.
    It sounded as if you wanted to present other options...

    Why is using puts() an "extremely unportable and bad solutions"?
    That was my suggestion, but you didn't read that far along, did you?
    No, no, no. Never was referring to puts. I read the whole post.

    You're not being 100% objective here. There are millions of legacy C programs, and there are still students who are required to use some legacy C IDE. I don't believe there is any reason to ignore their questions, and I don't believe there is any reason to get upset about seeing a reply to them that deals with legacy C features.
    I'm just asking, not blaming, because you seem to suggest things concerning Turbo C/C++ a lot, while others try to help in other ways.
    But I do believe it's a bad idea to present old code instead of trying to find solutions with newer code.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    I would guess that if it's too slow that it's because the OP is Printf-ing one character at a time. That's the usual story!
    If not, post some code!
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Elysia View Post
    I'm sure you have to battle with it, but you keep bringing it up to others, about using Turbo C/C++ and presenting a lot of old code.
    Not usually a good thing.
    I think that those of us who have done this long enough to have used those tools, don't see any point in forgetting everything we learned. The more things change the more they stay the same. We have more bits, more RAM, more storage, yet we continue to write code that's just as crappy as in the "old" days.

    A faster processor just means that things can go wrong faster.

    We all know that Turbo C is "obsolete" and yet I used it six months ago -- because it was the best tool for the job at hand. Am I seriously getting old enough to be annoyed at people who think the past is worthless?

    I'm not trying to suggest that using Turbo C and writing directly to the frame buffer is the right solution to the OP's problem -- I think that would be ridiculous. It just got me thinking.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by brewbuck View Post
    We all know that Turbo C is "obsolete" and yet I used it six months ago -- because it was the best tool for the job at hand. Am I seriously getting old enough to be annoyed at people who think the past is worthless?
    The past worthless? Never.
    In such case, C++ would be retired because Java & C# & Co exists.
    No, I do agree with you that something never is not always the best...

    I'm not trying to suggest that using Turbo C and writing directly to the frame buffer is the right solution to the OP's problem -- I think that would be ridiculous. It just got me thinking.
    It gets me thinking since it's mentioned such a lot. It's old and it's very standards compliant, so it's the least I would like to suggest if it can be helped.
    *shrug* That is why I asked.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Render text
    By Livijn in forum C++ Programming
    Replies: 6
    Last Post: 07-06-2007, 03:32 PM
  2. Printing \n on the screen in C
    By swgh in forum C Programming
    Replies: 4
    Last Post: 05-18-2007, 03:52 PM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  4. question about printing on screen and not overwriting text...
    By revelation437 in forum C Programming
    Replies: 2
    Last Post: 12-14-2002, 02:48 PM
  5. Printing out contents of a file to the screen
    By Simon in forum C Programming
    Replies: 18
    Last Post: 10-21-2002, 08:05 AM