0 Members and 2 Guests are viewing this topic.
int hello = 5;private enum Test [[ Times2 = hello * 2, Plus2 = hello + 2, etc.]]
enum colors { red, blue, green,}
I should post about my project of making a programming language...
Another thing: the subroutine thing has little point if it *takes* arguments but doesn't return anything. The function thing is on the right path, though I think you should just stick with the function thing but call it a sub instead (so that way if you in the future decide to add real functional aspects to the language, you don't have to completely re-invent everything)
private void SetCurrent(Color highlight, int pos, int len) { this.SelectionStart = pos; this.SelectionLength = len; this.SelectionColor = highlight;}
null func1()[[{{Code here}}]]
private void RoutineName(<any number of modifiers>) { //do stuff, but don't return anything}
private <any type that's not null or void> FunctionName(<any number of modifiers>) { //do stuff return <variable that is the same type as that specified in the function definition>; //This was the key difference between a function and a subroutine; this actually returned something}