linuxer4fun avatar

Daily programming challenge #5 The lost challenge

linuxer4fun

Published: 18 Jan 2017 › Updated: 18 Jan 2017

Daily programming challenge #5 The lost challenge

Difficulty: Hard!

In challenge #1, we created a programm, which parsed a string and gave out the string, that was to write.

NOW: Let's imagine, we want to create Variables in our Interpreter.

EXAMPLE:


INPUT (=File):
new_int_var (Hello = 123)
write (Hello + " HI")

OUTPUT (Terminal or output-field):
123 HI

HOW TO DO THAT? Well, first we need to parse the command and the arguement to it.

BUT: thats not the problem. We need to add an array, which saves the 1-NAME and the 2-VALUE. Once you add string-variables, you need to add the 3-TYPE.

EXTENSIONS:

EX1: add string-variable-types

EX2: add a function for input

EX3: BE HAPPY, THAT YOu JUST WROTE A BASIC INTERPRETER (this isn't something, everybody can do.)

BTW: If you are german and want to see my interpreter (#competition), check out

sites.google.com/sites/gerinterpreter.

As this is a really difficult question, feel free to ask me at any times. BUT don't post the answer to others ;-) 

Leave Daily programming challenge #5 The lost challenge to:

Written by

Read more #daily posts


Best Posts From linuxer4fun

We have not curated any of linuxer4fun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From linuxer4fun