From 1d461611bac782c272d0e082d5da74b4fe353ae6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 9 Nov 2025 18:42:16 -0500 Subject: Rename Num -> Float64, Num32 -> Float32 --- examples/learnxiny.tm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/learnxiny.tm b/examples/learnxiny.tm index a03db6c9..746e11a1 100644 --- a/examples/learnxiny.tm +++ b/examples/learnxiny.tm @@ -200,7 +200,7 @@ func demo_keyword_args() func takes_many_types( boolean:Bool, integer:Int, - floating_point_number:Num, + floating_point_number:Float64, text_aka_string:Text, list_of_ints:[Int], table_of_text_to_bools:{Text=Bool}, @@ -258,18 +258,18 @@ func demo_structs() # indicates which type it is, and any data you want to associate with it. enum Shape( Point, - Circle(radius:Num), - Rectangle(width:Num, height:Num), + Circle(radius:Float64), + Rectangle(width:Float64, height:Float64), ) # Just like with structs, you define methods and constants inside a level # of indentation: - func get_area(self:Shape->Num) + func get_area(self:Shape->Float64) # In order to work with an enum, it's most often handy to use a 'when' # statement to get the internal values: when self is Point return 0 is Circle(r) - return Num.PI * r^2 + return Float64.PI * r^2 is Rectangle(w, h) return w * h # 'when' statements are checked for exhaustiveness, so the compiler -- cgit v1.2.3