Lot's of work on Any and Type
This commit is contained in:
@@ -10,6 +10,11 @@ Slice :: struct
|
||||
|
||||
*/
|
||||
|
||||
Dynamic_Array :: struct
|
||||
data: *void
|
||||
len : S64
|
||||
cap : S64
|
||||
|
||||
Any :: struct
|
||||
data: *void
|
||||
type: Type
|
||||
|
||||
@@ -84,6 +84,10 @@ print :: (a: Any)
|
||||
OutputDebugStringA("Pointer")
|
||||
default;; OutputDebugStringA("Unknown")
|
||||
|
||||
// print_array :: (a: []Any)
|
||||
// for i := 0, i < length_of(a), i+=1
|
||||
// print(a[i])
|
||||
|
||||
|
||||
app_is_running := true
|
||||
window_procedure :: (hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM): LRESULT
|
||||
@@ -97,10 +101,12 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
|
||||
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
||||
good_scheduling = true
|
||||
|
||||
some_type: Type = Vec2
|
||||
char_info := get_type_info(char)
|
||||
val := 4232.23
|
||||
thing: Any = val
|
||||
print(val)
|
||||
// print_array({125.23, 32})
|
||||
|
||||
assert(char_info.kind == Type_Info_Kind.CHAR)
|
||||
#assert(int == int)
|
||||
|
||||
Reference in New Issue
Block a user