Visual Basic - How to create a simple programming language.

preview_player
Показать описание
This is my video on how to create a very simple programming/scripting language. I will be doing updates so keep an eye out.

If I get 100 likes ill think about adding in variables ;)
Рекомендации по теме
Комментарии
Автор

I worked out how to do variables!!!

First add this to the start of your code:
Dim variables As New Dictionary(Of String, String)()

This must only be run at the start so run this when the user clicks "Run"

Here is to add a variable: variables("variablename") = 10
Here is how to check a variable's value: variables("variablename")

So do something like this:
If testarray(0) = "var" Then
variables(testarray(1)) = testarray(2)
If testarray(0) = "getvar" Then



The command "var" is structured like this: var [variable name] [variable value] this command is used for creating a variable

The second command "getvar" prints the variable giving and is structured: getvar [variablename]

Hope this helps.

Naco
Автор

For variables:
Dim var As New Dictionary(Of String, String) ' Put this before the RunToolStripMenuItem_Click sub

If testarray(0) = "var" Then
var.Add(testarray(1), testarray(2))
End If

zerodotdan
Автор

This is really great i really liked the idea

rufarositotombe
Автор

You are AWESOME! Thanks very much man :) . But can you make a tuto for C# please?

yashade
Автор

i added booleans:
If codeArray(0) = "Bool" Then
If codeArray(2) = "true" Or "false" Then
Console.WriteLine("boolean " & codeArray(1) & " has been set to " & codeArray(2))
End If
End If

ImusingX
Автор

This is a little bit of codes i used for my programming language:
create:ball with dim :5px;5px ;
func.rotate.whileOnclick =
func.move"In Direction pressed"; If key.pressed = "A" then move = "5l"
loop.start = "OnKeyPress.OrClick then "loop.start.until = "keyReleased"

Simple game language...i will try to implement more! So what do you think?

Gaming
Автор

In my language I have added file writing, variables, inputs and am working on an interactive game engine.

Naco
Автор

Hi! This is great tutorial! Also, I had a request. Could you do a tutorial on how to make the programming language export the program as .exe file or some other file that runs on windows(like batch file .bat)? For example => “the way visual studio builds an .exe file.” Thanks!

helloworld
Автор

Thats great! You sound really good at programming :/ im envious

Robobbly
Автор

whenever I try to run the app, it does not want to start... What could I be doing wrong?

androshchukx
Автор

i have an error saying 'Index was outside the bounds of the array.' for the print one when i type print hello

aethletiic
Автор

You got 90 likes, and my subscribe, i'd love to see one of these with variables, please, thanks

gambitdevs
Автор

say it was like message ("hello") split it first. so you have "message" and "("hello")". Now we have that we can tell that you want a message. Then tell it to split the string "("hello")" firstly at " (" " and then " ") ". Now you just have hello as a string :)

Robobbly
Автор

Robeet Dilley, I like your tutorial but there is a problem
1.When i try to put a space while using print statement it does not prints that.
I hope you will help me

amitabharoy
Автор

it says i have need an end of statement on lines 9 and 10, and that i need expression on line 17. please help now.

gavindorough
Автор

looks good although why is so much in between " ". That usualy defines something that the computer doesn't need to parse so putting "In Direction pressed" is a bit wierd?

Robobbly
Автор

Nice man! Hope you can show it to me sometime? :D

Robobbly
Автор

sadly my avg is detecting it as a virus so no language :[

Gaming
Автор

Error 1 Type of 'i' cannot be inferred because the loop bounds and the step clause do not convert to the same type

eminchniti
Автор

Hello! This gets more tricky. What i would do if i where you is create another program like mine that looks for a file called program.txt or whatever and opens that on start up and then runs it. If you did this and placed them both into a self extracting EXE which just runs the program... it would run it just like an EXE. That probably didn't make sense so do you want a tutorial video? :)

Robobbly
welcome to shbcf.ru