Showing
4 changed files
with
0 additions
and
41 deletions
test3.c
deleted
100644 → 0
| 1 | -#include <stdio.h> | ||
| 2 | -#include <string.h> | ||
| 3 | - | ||
| 4 | -#include "bigpoint_cclass.h" | ||
| 5 | -#include "bigpoint_dyntype.h" | ||
| 6 | - | ||
| 7 | - | ||
| 8 | -int | ||
| 9 | -main(int argc, char * argv[]) | ||
| 10 | -{ | ||
| 11 | - char string[] = "ein weiterer test"; | ||
| 12 | - int integer = 42; | ||
| 13 | - float floating = 4.3; | ||
| 14 | - | ||
| 15 | - char * rstring = NULL; | ||
| 16 | - long rint = 0; | ||
| 17 | - double rfloat = 0.0; | ||
| 18 | - | ||
| 19 | - struct BIGPOINT_DYNTYPE * dynstring = | ||
| 20 | - new(BIGPOINT_DYNTYPE, BIGPOINT_DYNTYPE_STRING, strlen(string) + 1, string); | ||
| 21 | - struct BIGPOINT_DYNTYPE * dynint = | ||
| 22 | - new(BIGPOINT_DYNTYPE, BIGPOINT_DYNTYPE_INT, sizeof(long), (long)integer); | ||
| 23 | - struct BIGPOINT_DYNTYPE * dynfloat = | ||
| 24 | - new(BIGPOINT_DYNTYPE, BIGPOINT_DYNTYPE_FLOAT, sizeof(double), (double)floating); | ||
| 25 | - | ||
| 26 | - bigpoint_dyntype_get(dynstring, rstring); | ||
| 27 | - bigpoint_dyntype_get(dynint, rint); | ||
| 28 | - bigpoint_dyntype_get(dynfloat, rfloat); | ||
| 29 | - | ||
| 30 | - printf("%s\n", rstring); | ||
| 31 | - printf("%ld\n", rint); | ||
| 32 | - printf("%lf\n", rfloat); | ||
| 33 | - | ||
| 34 | - delete(dynstring); | ||
| 35 | - delete(dynint); | ||
| 36 | - delete(dynfloat); | ||
| 37 | - | ||
| 38 | - return 0; | ||
| 39 | -} | ||
| 40 | - | ||
| 41 | -// vim: set et ts=4 sw=4: |
Please
register
or
login
to post a comment