source: CIVL/examples/languageFeatures/printf.cvl@ 85d4675

1.23 2.0 main test-branch
Last change on this file since 85d4675 was 85d4675, checked in by Ziqing Luo <ziqing@…>, 12 years ago

implement printf and printf test

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@435 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 395 bytes
RevLine 
[85d4675]1#include<civlc.h>
2#include <stdio.h>
3
4int main(int argc, char * argv[]){
5
6 int i = 33;
7 double d = 33.3333333;
8 float f = 33.333;
9 char * s = "test 7";
10 printf("test1 aa\nbb aa\bbb aa\rbb aa\tbb\n");
11 printf("test2 %d, %o, %x \n", i,i,i);
12 printf("test3 %f,%e,%g,%a\n", d,d,d,d);
13 printf("test4 %f,%e,%g,%a\n", f,f,f,f);
14 printf("test5 %c,%s\n", i,s);
15 printf("test6 %c,%s\n", i,s);
16}
Note: See TracBrowser for help on using the repository browser.