Calligraphy and painting fiction software making more enjoyable reading, more comfortable writing, easier to publish
The most complete classical fiction net published by the software
Function Name: Open
Function: Open a file for reading or writing
Usage: int open (char *pathname, int access[, int permiss]);
program Example:
#include <string.h>#include <stdio.h>#include <fcntl.h>#include <io.h>intMain(void){intHandle;Charmsg[] = "Hello World";if((Handle=Open("test.$$$", O_creat | O_text))==-1){Perror("Error:");return1;}Write(Handle,msg, strlen(msg));Close(Handle);return0;}
Function Name: outport
Function: output integer to Hardware port
Usage: void outport (int port, int value);
program Example:
#include <stdio.h>#include <dos.h>intMain(void){intvalue = -;intPort=0; Outportb(Portvalue);printf("Value%d sent to port Number%d\n ",value, Port);return0;}
Function Name: OUTPORTB
function: Output byte to hardware port
Usage: void outportb (int port, char byte);
program Example:
#include <stdio.h>#include <dos.h>intMain(void){intvalue= -;intPort=0; Outportb(Portvalue);printf("Value%d sent to port Number%d\n ",value, Port);return0;}
Function Name: Outtext
Function: Displays a string in the viewport
Usage: void far outtext (char far *textstring);
program Example:
#include <graphics.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>intMain(void){/* RequestAutoDetection * *intGdriver=DETECT, Gmode, errorcode;intMidx, Midy; /* Initialize graphics and local variables */initgraph(&gdriver, &gmode, ""); /*ReadResult of initialization */ErrorCode=Graphresult();if (ErrorCode! = GrOk)/* An error occurred */{printf("Graphics Error:%s\n", grapherrormsg(ErrorCode));printf("Press any key to halt:");Getch(); Exit(1); /* Terminate with an error code */}Midx=Getmaxx()/2; Midy=Getmaxy()/2; /* Move the C.P to the center of the screen */MoveTo(Midx, Midy); /* Output text starting at the C.P. */Outtext(" This"); Outtext(" is"); Outtext("A"); Outtext("Test."); /* Clean up */Getch(); Closegraph();return0;}
Function Name: Outtextxy
Function: Displays a string at the specified location
Usage: void far outtextxy (int x, int y, char *textstring);
program Example:
#include <graphics.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>intMain(void){/* RequestAutoDetection * *intGdriver=DETECT, Gmode, errorcode;intMidx, Midy; /* Initialize graphics and local variables */initgraph(&gdriver, &gmode, ""); /*ReadResult of initialization */ErrorCode=Graphresult();if(ErrorCode! = GrOk)/* An error occurred */{printf("Graphics Error:%s\n", grapherrormsg(ErrorCode));printf("Press any key to halt:");Getch(); Exit(1); /* Terminate with an error code */}Midx=Getmaxx()/2; Midy=Getmaxy()/2; /* Output text at the center of the screen*//* note:the c.p. doesn ' t get changed.*/outtextxy(Midx, Midy, " This isA test. "); /* Clean up */Getch(); Closegraph();return0;}
Calligraphy and painting fiction software making more enjoyable reading, more comfortable writing, easier to publish
The most complete classical fiction net published by the software
C language Function--o