03-15-2024, 04:22 PM
I have question on this. If the code below is the final Small Basic code after language conversion and ready to be compiled, then what would your language version be.
In other words, what would you type in your language to be converted into the sample below - this would help understanding the scope of the project.
I would assume:
1] Comments and string literals ("This is textbox" etc) remain unchanged
2] Variable names (i, box etc) remain unchanged
3] Keywords (Sub, For etc) will be converted
4] Language commands (Controls, AddTextBox, SetTextBoxText etc) will be converted
So it is just keywords and language commands, am I missing anything in the plan?
The fist programming task therefore would be to identify keywords and language commands in some text.
In other words, what would you type in your language to be converted into the sample below - this would help understanding the scope of the project.
I would assume:
1] Comments and string literals ("This is textbox" etc) remain unchanged
2] Variable names (i, box etc) remain unchanged
3] Keywords (Sub, For etc) will be converted
4] Language commands (Controls, AddTextBox, SetTextBoxText etc) will be converted
So it is just keywords and language commands, am I missing anything in the plan?
The fist programming task therefore would be to identify keywords and language commands in some text.
Code:
'Start with a comment
Initialise()
Sub Initialise
For i = 1 To 10
box[i] = Controls.AddTextBox(25,25*i)
Controls.SetTextBoxText(box[i],"This is textbox"+i)
EndFor
EndSub