s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.74k stars 198 forks source link

Added missing semicolon to C++ hello world example #34

Closed hak8or closed 9 years ago

hak8or commented 9 years ago

Now the example compiles.

s-macke commented 9 years ago

Hi,

the error is meant to be there.It is always the problem what I want to show the people arriving at such a website and what is the audience. In this case I want also to show, how errors are represented, because I think, this is a cool feature. Of course I am not sure, if this is the correct way. There is the audience of C pros, who immediately understand, what's the problem and how to fix them, and others (which might or might not the majority), which have never seen C and think, that the website is somehow broken. But I think the whole project is made for people more on the pro site, but maybe I am wrong. What do you think? I think the best way would be, to include a list of examples in some sort of filetree. This is anyhow planned since a long time.

erronjason commented 9 years ago

I'd recommend leaving a comment to that effect in the file itself. Something to the tune of: /* This example file is purposely broken to show how errors display. Place a semicolon at the end to see it compile successfully. */

s-macke commented 9 years ago

Compromise: I will accept this patch but will add something, that will produce just a warning. And in the long term I will include a menu with tons of C examples.