Linear Algebra and the C Language/a0e6
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
int X_stop_w(void)
{
printf("\n Press return to continue");
printf("\n Press X return to stop ");
return(toupper(getchar())!='X');
}
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
clrscrn();
printf(" Hello word !\n\n");
}
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
I rename the function studied with the prefix X_ to differentiate it from the one with the same name in the library.
Screen output example:
Hello word !
Press return to continue
Press X return to stop