landry@apollo.COM (Chris Landry) (11/29/88)
I'm a fairly new MSDos TurboC user. (vers 1.0)
But I've used msdos TurboPascal for some years.
Does TurboC allow screen functions like...
clrscr(); gotoxy(x,y); clreol(); etc?
I cannot get a program to compile/link with these functions.
---------------------------------------
main()
{
printf("\n\nHello\n\n");
gotoxy(1,1); <----- Undefined symbol '_gotoxy'
printf("Goodbye\n");
}
---------------------------------------
I've looked in all the standard include files and
found nothing. I know these are not ANSI standard
but I would assume TurboC would define them somewhere.
Where is it?
Am I missing something?
ADVthanksANCE
--
Chris Landry landry@apollo.uucp
Apollo Computer, Chelmsford MA apollo!landry@eddie.mit.edu
landry@apollo.COM (Chris Landry) (11/29/88)
I'm a fairly new MSDos TurboC user. (vers 1.0)
But I've used msdos TurboPascal for some years.
Does TurboC allow screen functions like...
clrscr(); gotoxy(x,y); clreol(); etc?
I cannot get a program to compile/link with these functions.
---------------------------------------
main()
{
printf("\n\nHello\n\n");
gotoxy(1,1); <----- Undefined symbol '_gotoxy'
printf("Goodbye\n");
}
---------------------------------------
I've looked in all the standard include files and
found nothing. I know these are not ANSI standard
but I would assume TurboC would define them somewhere.
Where is it?
Am I missing something?
ADVthanksANCE
--
Chris Landry landry@apollo.uucp
Apollo Computer, Chelmsford MA apollo!landry@eddie.mit.edu
wew@naucse.UUCP (Bill Wilson) (11/30/88)
From article <3ff17f35.7183@apollo.COM>, by landry@apollo.COM (Chris Landry): > Does TurboC allow screen functions like... > clrscr(); gotoxy(x,y); clreol(); etc? > I cannot get a program to compile/link with these functions. > You have an old and out-datedversion of Turbo C. You should update to the latest version (2.0) (if you own the package) or you should buy a new copy. Borland started including the graphics routines with version 1.5. Their newest version has the same routines (minus some bugs) and also a nice debugger. I was able to port GNUPLOT to Turbo C and the debugger was invaluable. Prior to version 1.5 you had to write all of your own graphics primitives. -- Bill Wilson (Bitnet: ucc2wew@nauvm) Northern AZ Univ Flagstaff, AZ 86011 {These views are mine and do not necessarily reflect those of my employer}
garnett@a.cs.okstate.edu (John Garnett) (11/30/88)
From article <3ff17f35.7183@apollo.COM>, by landry@apollo.COM (Chris Landry): > I'm a fairly new MSDos TurboC user. (vers 1.0) > > Does TurboC allow screen functions like... > > clrscr(); gotoxy(x,y); clreol(); etc? > > gotoxy(1,1); <----- Undefined symbol '_gotoxy' > but I would assume TurboC would define them somewhere. > > Where is it? I believe that these functions are prototyped in conio.h (i.e. #include <conio.h>). I know for sure that Turbo 1.5 has this include file; however, I'm not sure whether Turbo C 1.0 has it or not. John Garnett ~ John Garnett Internet: garnett@a.cs.okstate.edu ~ Computing and Information Sciences UUCP: {cbosgd, ihnp4, rutgers}! ~ Oklahoma State University okstate!garnett
jerry@starfish.Convergent.COM (Gerald Hawkins) (11/30/88)
From article <3ff17f35.7183@apollo.COM>, by landry@apollo.COM (Chris Landry): > > I'm a fairly new MSDos TurboC user. (vers 1.0) - Try using 1.5 or 2.0. I have no idea how lousy 1.0 is. You should check your manual. The 2.0 manual tells you exactly what headers all of the 450+ functions require. Some substitute manuals for bootleg users don't. > > Does TurboC allow screen functions like... > > clrscr(); gotoxy(x,y); clreol(); etc? > Chris Landry landry@apollo.uucp > Apollo Computer, Chelmsford MA apollo!landry@eddie.mit.edu - Yes. I think they are in <conio.h> right off the top of my head. Rainy Days and Automatic Weapons Fire Alway Get Me Down. These opinions are mine. Jerry. (jerry@starfish.convergent.COM) -----
smith@umbc3.UMD.EDU (Mr. Fred Smith ) (11/30/88)
In article <3ff17f35.7183@apollo.COM> landry@apollo.COM (Chris Landry) writes: > >I'm a fairly new MSDos TurboC user. (vers 1.0) >But I've used msdos TurboPascal for some years. > >Does TurboC allow screen functions like... > > clrscr(); gotoxy(x,y); clreol(); etc? > >I cannot get a program to compile/link with these functions. >--------------------------------------- >I've looked in all the standard include files and >found nothing. I know these are not ANSI standard >but I would assume TurboC would define them somewhere. >Where is it? >Am I missing something? Chris, Did you include <conio.h> when you compiled? I'm guessing that this is included in ver. 1.0. 1.5 contains this and you must include that file to use those functions. I've used them frequently in my programs. good luck fred
spolsky-joel@CS.YALE.EDU (Joel Spolsky) (11/30/88)
In article <3ff17f35.7183@apollo.COM> landry@apollo.COM (Chris Landry) writes: | | Does TurboC allow screen functions like... | | clrscr(); gotoxy(x,y); clreol(); etc? Yes, but only version 1.5 or later. +----------------+----------------------------------------------------------+ | Joel Spolsky | bitnet: spolsky@yalecs.bitnet uucp: ...!yale!spolsky | | | internet: spolsky@cs.yale.edu voicenet: 203-436-1483 | +----------------+----------------------------------------------------------+ #include <disclaimer.h>
swarbric@tramp.Colorado.EDU (Frank Swarbrick) (11/30/88)
In article <3ff17f35.7183@apollo.COM> landry@apollo.COM (Chris Landry) writes: >I'm a fairly new MSDos TurboC user. (vers 1.0) >But I've used msdos TurboPascal for some years. >Does TurboC allow screen functions like... > clrscr(); gotoxy(x,y); clreol(); etc? Did you *just* get 1.0? 1.5 came out last winter, and 2.0 came out this fall. Anyway, those functions are included with 1.5 and 2.0, but not 1.0. I suggest you call Borland and order an update. Frank Swarbrick (and, yes, the net.cat) University Of Colorado, Boulder swarbric@tramp.Colorado.EDU ...!{ncar|nbires}!boulder!tramp!swarbric "Cling to the past and you'll be left behind." --Y & T
ds@pcsbst.UUCP (Dieter Stubler) (12/01/88)
In article <3ff17f35.7183@apollo.COM> landry@apollo.COM (Chris Landry) writes: > >I'm a fairly new MSDos TurboC user. (vers 1.0) >But I've used msdos TurboPascal for some years. > >Does TurboC allow screen functions like... > > clrscr(); gotoxy(x,y); clreol(); etc? > If you would have bougth this compiler, you would have a manual. Further you would have version 2.0 with all his benefits. So if are not able to spend a few $ for this nice compiler, you should not tell all the world, that you are using an illegal copy, by asking such silly questions. This newsgroup is no manual replacement !!! Think about it Dieter
xmjschm@hscfvax.harvard.edu (MJSchmelzer) (12/03/88)
In article <1045@naucse.UUCP> wew@naucse.UUCP (Bill Wilson) writes: >From article <3ff17f35.7183@apollo.COM>, by landry@apollo.COM (Chris Landry): >> Does TurboC allow screen functions like... >> clrscr(); gotoxy(x,y); clreol(); etc? > >Prior to version 1.5 you had to write all of your own graphics >primitives. Here are the graphics primitives I used for TurboC 1.0 : void cls() { union REGS r; r.h.ah=6; r.h.al=0; r.h.ch=0; r.h.cl=0; r.h.dh=24; r.h.dl=79; r.h.bh=7; int86(0x10, &r, &r); } void move_to (row, col) int row; int col; { union REGS r; r.h.ah=2; r.h.dh=row; r.h.dl=col; r.h.bh=0; int86(0x10, &r, &r); } -- ============== xmjschm@harvspha.BITNET ============= "Your soul is mine, Mike Schmelzer xmjschm@hscfvax.harvard.edu fork it over." ===================================================== - Salem 66
asmar@ucrmath.UUCP (Paul Asmar) (12/05/88)
You have to initialize the screen with a built-in routine (initgraph() I think), so that Turbo C can install the right graphics card (.BGI file). You should look at the graphics help provided by Turbo C, and/or bgidemo.c that uses most of the graphics tools, and is a good guide. Paul Asmar
gene@ntvax.UUCP (Gene DeLisa CEMI) (12/10/88)
In article <3ff17f35.7183@apollo.COM> landry@apollo.COM (Chris Landry) writes: >I'm a fairly new MSDos TurboC user. (vers 1.0) >Does TurboC allow screen functions like... > clrscr(); gotoxy(x,y); clreol(); etc? You need version 1.5 or greater. They included a graphics library with that release. version 2.0 is now current. In the meatime you can use the video bios routines with int86(). They're pretty slow. It would be better to just write to video memory. Gene De Lisa Center for Experimental Music and Intermedia