source: CIVL/examples/languageFeatures/printf.cvl@ 13953d1

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

support non-concrete integers , float-point variables and strings

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

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