Structs Library
Root / Submissions / [.]
snail_Created:
Download:KEV343A4Version:1.1Size:15.9 KB
This library allows the programmer to define, instantiate, and manipulate structs within SmileBASIC. This library is created with vanilla SB code, no funny tricks. Simple, efficient, and applicable to a broad range of scenarios, it brings SB one step closer to object-oriented paradigms.
@STRUCT_PROGRAM DATA "STRING","NAME" DATA "STRING","AUTHOR" DATA "FLOAT","VERSION" DATA "STRING","KEY" DATA "END" DIM LIB[0] STRUCT "PROGRAM" OUT LIB SET LIB,"NAME","Structs Library" SET LIB,"AUTHOR","slackerSnail" SET LIB,"KEY","4KXP3EBD" SET LIB,"VERSION",1.0 PRINT FIELD(LIB,"NAME");" ";FIELD(LIB,"VERSION") PRINT "By: ";FIELD(LIB,"AUTHOR") PRINT "Key: ";FIELD(LIB,"KEY")
Replying to:hakke
Hey. I have a problem, in FLOATTEST, the output is that I have is:
1 1When I think it should be the values of PI() and EXP()
Oops.
I made a great mistake.
Sorry!
Replying to:Defaultio
Why are we making programming languages again???
Why are they so hard to learn and not begginner oriented languages???
Questions are fun.
This isn't a language, this provides an interface and a struct data type.