From 0c9ba3ef86da144147d28eacff7ba0a370c199c0 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Fri, 15 Nov 2024 20:03:00 -0800 Subject: [PATCH] Tweaks --- examples/gemini/arrays.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gemini/arrays.fs b/examples/gemini/arrays.fs index 646af70..4ff1b9b 100644 --- a/examples/gemini/arrays.fs +++ b/examples/gemini/arrays.fs @@ -35,7 +35,7 @@ variable arp arstack arp ! 1 constant STRING 2 constant INTEGER 3 constant REAL -create array-sizes cell , 1 , cell , 4 , +create array-sizes cell , 1 , cell , sfloat , : >esize ( type -- n ) cells array-sizes + @ ; ( ref n type ^data... ) @@ -50,7 +50,7 @@ create array-sizes cell , 1 , cell , 4 , : range ( a -- a n ) dup >count @ ; ( Create an uninitialized array ) -: array ( n type -- a ) +: array ( n type -- a: a ) 2dup >esize * header-size + allocate throw header-size + apush top >type ! top >count ! 0 top >ref ! ;