mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 16:54:25 +00:00
- examples/opengl.fch: OpenGL 3.3 core, shaders, VAO/VBO, a spinning triangle (checked offscreen) - examples/vulkan.fch: instance, GPUs with properties/memory/queues, logical device and queue - ptr(n) and int(p) conversions for C APIs that pass offsets as pointers - .ptr works on string literals; a comma after the last call argument is allowed - a missing header included by an imported header is now named in the error - the old .fn extension hint is gone (Finch is new, there are no old files) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
365 B
Text
22 lines
365 B
Text
import "string.h"
|
|
|
|
struct Point {
|
|
int x
|
|
int y
|
|
}
|
|
|
|
fn main() {
|
|
p := Point(
|
|
x: 1,
|
|
y: 2,
|
|
)
|
|
print(p)
|
|
c := "finch".ptr
|
|
print(c[1], strlen("finch"))
|
|
q := ptr(4096)
|
|
print(int(q), int(ptr(0)) == 0, q != null)
|
|
a := [10, 20, 30]
|
|
address := int(a.ptr)
|
|
ptr[int] second = ptr(address + 8)
|
|
print(second.value)
|
|
}
|