[Plib-cvs] plib/examples/src/psl/data header.psh,NONE,1.1 test.psl,1.12,1.13
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-09-10 04:37:42
|
Update of /cvsroot/plib/plib/examples/src/psl/data In directory usw-pr-cvs1:/tmp/cvs-serv15285/plib/examples/src/psl/data Modified Files: test.psl Added Files: header.psh Log Message: Added #include processing. --- NEW FILE: header.psh --- void newline () { printf ( "\n" ) ; } void tab () { printf ( "\t" ) ; } Index: test.psl =================================================================== RCS file: /cvsroot/plib/plib/examples/src/psl/data/test.psl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- test.psl 8 Sep 2002 22:17:32 -0000 1.12 +++ test.psl 10 Sep 2002 04:37:39 -0000 1.13 @@ -1,31 +1,37 @@ +#include <data/header.psh> + void main () { int i ; for ( i = 0 ; i < 20 ; i = i + 1 - 3 + 3 ) { -if ( i == 10 ) continue ; -if ( i == 17 ) break ; + if ( i == 10 ) { printf ( "Continuing past TEN\n" ) ; continue ; } + if ( i == 17 ) { printf ( "Seventeen is enough!\n" ) ; break ; } switch ( i ) { case 0 : case 1 : case 2 : - printf ( "Small! " ) ; + printf ( "Small!" ) ; + tab () ; break ; case 3 : case 4 : case 5 : - printf ( "Medium! " ) ; + printf ( "Medium!" ) ; + tab () ; break ; default: - printf ( "Huge! ", i ) ; + printf ( "Huge!" ) ; + tab () ; break ; } - printf ( "\n" ) ; + printf ( " ", i ) ; + newline () ; } } |