diff examples/c3/cast.c3 @ 300:158068af716c

yafm
author Windel Bouwman
date Tue, 03 Dec 2013 18:00:22 +0100
parents test/c3examples/cast.c3@d9df72971cbf
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/c3/cast.c3	Tue Dec 03 18:00:22 2013 +0100
@@ -0,0 +1,18 @@
+
+/*
+ Demo of how to type cast
+*/
+
+module castdemo;
+
+function int testcast()
+{
+    var int a;
+    var int* b;
+    a = 3;
+    
+    b = cast<int*>(a);
+
+    return 0;
+}
+