プレイ日記
Kl'Dck Hul HissingToaster
I'm looking to write some beginner friendly tutorials for Lowerdash and wanted to gauge the average ability in the community. What are peoples reactions to this example? I tried to only use "namespaces" and nothing else from LD.
7そうだね
プレイ済み
返信[1]
親投稿
Kl'Dck Hul HissingToaster
Running the example...
0そうだね
プレイ済み
返信[2]
親投稿
Kl'Dck Hul HissingToaster
I saved the example as _COMBAT in the same project
0そうだね
プレイ済み
返信[3]
親投稿
SıмΞоп SimeonW
Yeah, I understand it But wait "MODULE"? Thats a thing? So then SmileBASIC is object oriented?
0そうだね
プレイ済み
返信[4]
親投稿
Arthur acorliss
Modules are probably just a lexical scoping thing, rather than OO. I'm looking at this app myself just to see if I can get my kids into programming.
1そうだね
プレイ済み
返信[5]
親投稿
Alex MrCashews
Lowerdash is a precompiler that Kl'D made to add object-oriented code extensions to SB. In no way is the base language OOP, it's just a BASIC flavor.
2そうだね
プレイ済み
返信[6]
親投稿
Kl'Dck Hul HissingToaster
@Alex hit the nail on the head! @Arthur Vanilla SB has everything I would've wanted first starting out. Its great you're converting your kids :p MODULE does two things used this way: 1. scoping 2. create a convenience DEF to look through that scope. I left #2 out of this example. If you were to add: EXPORT DEF new then the module can be used as a class. Im loving the better phrasing you guys
1そうだね
プレイ済み
返信[7]
親投稿
Arthur acorliss
I appreciate the scoop. I saved the old Timex Sinclair 1000, but I only got side eye. ;-)
0そうだね
プレイ済み
返信[8]
親投稿
BBB agaaron
I have a few questions about this syntax and surely I'll have more as I'm very interested in Lowerdash. The SBS docs are a bit overwhelming. Classes would make some of my programs much easier to program though. Do the percentage "%" signs signify they are local in scope to the module? Can you tell me more about instancing & updating objects after creating a class?
0そうだね
プレイ済み
返信[9]
親投稿
Kl'Dck Hul HissingToaster
@BBB % is an int. # double. $ string. If you go to the docs, you can type #section at the end of the address bar. Ill use them to be brief. A module with a #CONSTRUCTOR can be instantiated with #NEW. Instances are referenced through strings. #EXPORT Defs are methods. You should also get a setter for each #MEM (ber), but there is great bug.
1そうだね
プレイ済み
返信[10]
親投稿
Kl'Dck Hul HissingToaster
When working in a module, its all about #ME
1そうだね
プレイ済み
返信[11]
親投稿
BBB agaaron
Thank you for all the help! You are the developer? To clarify, did you want me to look at the "Structure" section of your documentation? What is the maximum integer value? What about double? Oh okay, so any module can be a class? Cool. I would love an example of this! I'm not sure what members, getters/setters are and your last message was a bit cryptic to me.
0そうだね
プレイ済み
返信[12]
親投稿
Kl'Dck Hul HissingToaster
I was trying to direct you to the individual commands. Structure is the reference for your main file. The list of class commands is in Dynamic objects under #objects. Int,Double, and string are SmileBasic things. Ints are 1byte. Doubles are... 8? Yep any module. I would recommend passing/using the Module object unless you have members.
1そうだね
プレイ済み
返信[13]
親投稿
Kl'Dck Hul HissingToaster
Methods, members, getters and setters are common names when talking about class data Methods are things the class knows how to do. EG a ball can bounce Members are things that belong to that class. EG a yoyo has a string. Getters and setters are a design pattern where Members are exposed with Methods. EG a cashier has money in their drawer and can take your money and put it in the same drawer.
1そうだね
プレイ済み
返信[14]
親投稿
Alex MrCashews
SmileBASIC ints are 32-bit signed, two's compliment. 1-byte ints would be worthless. Doubles are just regular doubles like you would see in any computer.
1そうだね
プレイ済み
返信[15]
親投稿
Kl'Dck Hul HissingToaster
@Alex is right. I don't know what numbers I said... they're wrong...
0そうだね
プレイ済み
返信[16]
親投稿
Alex MrCashews
i got ur back bby
1そうだね
プレイ済み