Post by Izy Coder on Oct 17, 2014 23:51:24 GMT 10
Hey Guys ! you know ? programming language ? can I make a programming language ? like VB, C, C#, C++, Java ? like when the text in richtextbox is $MSG "Hello World !"
Message box show text "Hello World" I had watched the tutorial in here : Linkbut it only read the "Hello then the message box will be "Hello , I don't want that " Symbol. Only Hello. or something like this :
Main Class Testing $MSG "Hello World", choice1 = "OK", "Cancel" $Variable = @choice1 1 = End Class 2 = End Class End Variable
This will show a Message Box with title "Testing" The Text "Hello World" And Two Button, button 1 "Ok" will close the message box, same as the "Cancel" button. It because the command is "End Class". This is just an idea for my programming language. If you know how to make like that, please tell me. also, tell me if you want to help ! here : Linkscroll down until you see "Contact" form.
Check Out My Project At VSlang InternetTM. More Project : - Poroxnoss Text Editor 2 - Added soon...
- TAP 2D Game Maker - Coming really soon...
- Easy Desktop - Discontinue..
|
|
Post by Nathan Lecompte on Oct 18, 2014 11:36:38 GMT 10
Hey Izy, What code are you using to read the commands?
|
|
Post by Izy Coder on Oct 19, 2014 3:17:40 GMT 10
|
|
Post by Nathan Lecompte on Oct 21, 2014 15:53:29 GMT 10
What codes from the tutorial specificly?
|
|
Post by Prezence on Oct 22, 2014 6:05:27 GMT 10
Because you are splitting the line by a space, the hello and the world get put in separate values in the array. To convert all the arguments back to a string, try this: 'when you split the string to get the command and arguments
Dim arr = <THESTRING>.Split(" ") 'i.e. $MSG "Hello World" is now {"$MSG", "Hello", "World"}
Dim command = arr(0) 'set to $MSG Dim args as String = ""
If arr.length > 1 Then For i = 1 to arr.Length - 1 args += arr(i) 'put all args back into one string If not i = arr.Length - 1 args += " " 'add spaces back in End If Next End If
'Then you can check the command:
Select Case command Case "$MSG" MsgBox(args.Replace("""","")) Case "something-else" '(no spaces in command) Case Else End Select
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|