Replies: 4 comments 3 replies
-
Hi @wc-yaa:
There are a few breaking changes in Small Visual Basic.
The most reason to break Small Basic codes in Small Visual Basic is variable domains. In SB, all variables are global to the whole file, but in sVB, variables defined inside a subroutine are private to this sub routine and are invisible to other subroutines. So, to fix this issue when you port any SB code to sVB, you should initialize the variables that sVB complain about at the beginning of the file, by seeting them to 0 or "" or [] for arrays. It is aldo recommended to convert variables that are used to send data to subroutines to parameters and convert variables that recive data from subroutines to function return variables. For example, this SB code:
```
X = 10
Y = 20
Sum()
TextWindow.WriteLine(z)
Sub Sum
z= X + Y
EndSub
```
Should be written like this in sVB:
```
Z = Sum(10, 20)
TextWindow.WriteLine(Z)
Function Sum(x, y)
Returnx + y
EndFunction
```
Or you can even get rid of z:
```
TextWindow.WriteLine(Sum(10, 20))
```
This is the correct way to organize the variable in your program, and teaching kids otherwise is a bad practice and will make them suffer when move on to real programming languages.
There are other breaking changes. For example, sVB doesn't allow to use spaces between arguments, and only allow the comma.
The serious issue that can't be easily fixed, is that sVB can't use the external libraries crated for SB, like LitDev, unless they are rewritten for sVB to target the SmallVisualBasicLiberary.dll. So, if any of the listed SB programs use such libraries they will not work in sVB. Personally, I stand against using such external libraries, because they complicate things and don't let the kid learn programming in the natural order. We need him to create things by himself to get the experience and train his mind on using logic and algorithms.
I will provide a series of books to introduce sVB and programming concepts to kids and beginners from 6 to 18 years old. This series will enhance the kids understanding of math and other educational context via using it in programming, beside playing with shapes, colors, animation, and simple games.
I already wrote the level-1 book for 6 years old kids, and looking for a publisher so I can write the rest of the series.
…________________________________
From: wc-yaa ***@***.***>
Sent: Monday, January 8, 2024 2:29 PM
To: VBAndCs/sVB-Small-Visual-Basic ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [VBAndCs/sVB-Small-Visual-Basic] Amateur question. Small Basic codes cannot be run directly. (Discussion #48)
Hi...many fun Small Basic codes can be found here: https://techcommunity.microsoft.com/t5/small-basic-blog/small-basic-game-gallery/ba-p/335982
However, those codes cannot successfully be run in sVB. Different types of errors always happen. sVB is not too compatible with SB. May this scare some beginners?
—
Reply to this email directly, view it on GitHub<#48>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALQ5MVXSQQ6PDJHSRD3BC2DYNP7FTAVCNFSM6AAAAABBRRPL3SVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGA2DGOJTGU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Correction: The space between Return and x is erazed maybe by the email or gethub:
```
Z = Sum(10, 20)
TextWindow.WriteLine(Z)
Function Sum(x, y)
Return x + y
End
```
…________________________________
From: wc-yaa ***@***.***>
Sent: Monday, January 8, 2024 2:29 PM
To: VBAndCs/sVB-Small-Visual-Basic ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [VBAndCs/sVB-Small-Visual-Basic] Amateur question. Small Basic codes cannot be run directly. (Discussion #48)
Hi...many fun Small Basic codes can be found here: https://techcommunity.microsoft.com/t5/small-basic-blog/small-basic-game-gallery/ba-p/335982
However, those codes cannot successfully be run in sVB. Different types of errors always happen. sVB is not too compatible with SB. May this scare some beginners?
—
Reply to this email directly, view it on GitHub<#48>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALQ5MVXSQQ6PDJHSRD3BC2DYNP7FTAVCNFSM6AAAAABBRRPL3SVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGA2DGOJTGU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks.
The sVB reference book contains info about thee Small Basic library, which is written by the SB team as the xml documentation comments on methods that appears in thee help window in SB. I wrote the xml documentation comments for each method I added in sVB one by one over 2 years. Visual studio saves these documentation comments in an xml file with the same name as the sVB library file, so, when I decided to wrote the book, I created a program to reead this file, format it with suitable font sizes, colors and indentation, so I got a 150 pages of the book as a kick start. I went through these 150 pages to add some notes, images and code examples, which made them grow rapidly. The Only part that needed to be written entirely is the IDE documentation (Form designer and code editor) and the details about the sVB syntax, and of course the introductions. I left one step for readers to help me with: reviewing the book, because I couldn't read the whole book again to correct any grammar errors or improve some statements, which I only do occasionally while I am modifieng some section in the book after an sVB update. And by the way, the book is 780 pages now!
Thanks.
…________________________________
From: wc-yaa ***@***.***>
Sent: Tuesday, January 9, 2024 2:15 AM
To: VBAndCs/sVB-Small-Visual-Basic ***@***.***>
Cc: Mohammad Hamdy Ghanem ***@***.***>; Comment ***@***.***>
Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] Amateur question. Small Basic codes cannot be run directly. (Discussion #48)
Thanks for explaining in detail. I understand now. I have some BASIC knowledge but not too much.
I already wrote the level-1 book for 6 years old kids, and looking for a publisher so I can write the rest of the series.
Wow! You are very enthusiastic and passionate. Sure!!!
Did the PDF book(750 pages) written by you alone? Really amazing. I hope that you will succeed at last!
—
Reply to this email directly, view it on GitHub<#48 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALQ5MVSNZC62XXSOOJGHZDLYNSR5DAVCNFSM6AAAAABBRRPL3SVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DANJZGU4TK>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I am not a graphic designer. I created this logo by the sVB form designer. If I found a publisher for the sVB books, I may ask the editorial team to design a better logo.
…________________________________
From: wc-yaa ***@***.***>
Sent: Wednesday, January 10, 2024 10:57 AM
To: VBAndCs/sVB-Small-Visual-Basic ***@***.***>
Cc: Mohammad Hamdy Ghanem ***@***.***>; Comment ***@***.***>
Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] Amateur question. Small Basic codes cannot be run directly. (Discussion #48)
I wrote the xml documentation comments for each method I added in sVB one by one over 2 years.
You are so diligent.!
I went through these 150 pages to add some notes, images and code examples,
Very interesting publishing experience.
I left one step for readers to help me with: reviewing the book,
If most Small BASIC users know the existences of the software(sVB) and the book, they will easily become the readers of the book and the followers of the software. Actually, the user community of Small Basic should be very big. ( Some videos about Small Basic on Youtube have large numbers of views.)
And by the way, the book is 780 pages now!
Well done!!!
I am curious. I am not a graphic expert. The blue logo of sVB is nice and neat.
Since sVB is a programming language for kids, a cute mascot in the logo may make a good first impression on the kids. For example. there is a snake in the Pygame's logo: https://www.pygame.org/docs/_images/pygame_logo.png
I am only curious.
—
Reply to this email directly, view it on GitHub<#48 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALQ5MVXMJ2XSQE6A2NDBWRTYNZX3LAVCNFSM6AAAAABBRRPL3SVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DANZYGYYTI>.
You are receiving this because you commented.
[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free.www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi...many fun Small Basic codes can be found here: https://techcommunity.microsoft.com/t5/small-basic-blog/small-basic-game-gallery/ba-p/335982
However, those codes cannot successfully be run in sVB. Different types of errors always happen. sVB is not too compatible with SB. May this scare some beginners?
Beta Was this translation helpful? Give feedback.
All reactions