Jump to content

Recommended Posts

Posted

I made a c++ program which reads what the user types and kinda pseudo-compiles* it so that the user can input functions. I'm a noob to c++ and I had no idea how I was going to display graphs and functions based on an equation the user could type in (such as "y = x^2+3") for my graph program, so I made a text based interpreter with my own language*.

 

It works kinda like this

 

m,100,&A would "move" the value 100 to the variable A

same as

A = 100;

 

+,&X,1,&X would add variable X and 1, store in X

same as

x++;

or

x+=1;

 

I realized it's vaguely like asm, but I just set it up this way so I can prepare a command and then get the input.

 

I even got working goto and label statements.

 

I got if and else statements and comparisons kinda working but not done.

 

Is anyone interested?

demo, source?

 

*I'm probably using the wrong terminology.

  • 3 weeks later...
Posted

Wow...that`s nice man...I`m crazy to enter in nice projects like this, but i`m kind of studying to much =//...then I have to go slow on the thinks that i want to do "for myself"

 

If I have some time, I`ll see all this project ^^

 

added to my list of "Things to do"

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...