Synchronize common scilab examples with other languages
This commit is contained in:
parent
a41efbd0f7
commit
ea634d54a5
4 changed files with 7 additions and 8 deletions
|
|
@ -25,7 +25,7 @@ double dvar = 0;
|
|||
char *strvar = 0;
|
||||
const char cstrvar[] = "Goodbye";
|
||||
int *iptrvar = 0;
|
||||
char name[5] = "Dave";
|
||||
char name[256] = "Dave";
|
||||
char path[256] = "/home/beazley";
|
||||
|
||||
|
||||
|
|
@ -51,10 +51,10 @@ void print_vars() {
|
|||
printf("dvar = %g\n", dvar);
|
||||
printf("cvar = %c\n", cvar);
|
||||
printf("strvar = %s\n", strvar ? strvar : "(null)");
|
||||
printf("cstrvar = %s\n", cstrvar ? cstrvar : "(null)");
|
||||
printf("iptrvar = %i\n", value_int(iptrvar));
|
||||
printf("name = %c%c%c%c%c\n", name[0],name[1],name[2],name[3],name[4]);
|
||||
printf("ptptr = %p (%d, %d)\n", ptptr, ptptr->x, ptptr->y);
|
||||
printf("cstrvar = %s\n", cstrvar);
|
||||
printf("iptrvar = %p\n", (void *)iptrvar);
|
||||
printf("name = %s\n", name);
|
||||
printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
|
||||
printf("pt = (%d, %d)\n", pt.x, pt.y);
|
||||
printf("status = %d\n", status);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue