Hyper C Compiler
It's basically shorthand c.
Currently only a windows standalone build.
Let me know what you think, don't be shy with the comments.
Printable View
Hyper C Compiler
It's basically shorthand c.
Currently only a windows standalone build.
Let me know what you think, don't be shy with the comments.
I think you need to put in much more documentation. At the moment, it looks like you're only adding some "shortcuts" to C that might not be very useful, e.g., I see mention of # for int and ## for double... how does that account for other types like short, long, float, long double?
I would agree. There are more features than currently on the site and it will be updated. I posted on here to get an idea of what would be "useful" as far as what i should add to it or take out. And if anyone was even interested in a shorthand c. I prefer HyperC as it helps me create quick applications and automate repetitive and tedious tasks.
It might also be good to say what features of C have been suppressed, e.g., for comments you list the single-line // comments, which are already part of standard C. Does that mean that your variant of C doesn't allow the old multi-line /* */ comments?
I also note that assigning to arrays is not allowed in C, but in your structure example, it appears that that is allowed in your C variant. You might want to highlight it if so, and explain the semantics.
HyperC :: Conjoin
You can directly insert a file into a HyperC application. using
Code::>
Code:file.name;
This will import the raw file contents.
HyperC :: Select
Code:
HyperC :: LoopCode:case a == 1 {
} || a == 2 {
} else {
};
Code:
HyperC :: ConcatCode:loop 1 to 100 as i {
};
Code:
HyperC :: SubsCode:<string.h>;
@{
$output[] = "Hello";
output += " World";
};
HyperC :: FunctionsCode:@display(#number) {
ink "Number: " #number;
};
@{ display(); };
Code:#@add(long one,double two) {
return (one+two);
};
@{ ink #add(100,100); };
PREFIX and SUFFIX preprocess.
HyperC is designed to make things faster. One of my favorite ways it does this is with; and and; preprocess commands.
Lets say you have a structure person and you want to define all the different values within that object.
BEFORE:
etc...Code:person.name = "myname";
person.number = "5555555";
person.height = "0";
with WITH you can make this process a lot faster and easier.
AFTER:
With will prefix whatever is after the command before every line after it untill you change the with or null it with with; You can do the same for the suffix using and;Code:with person.;
name = "myname";
number = "5555555";
height = "0";
with;
Another example is writing text to the console with ink in hyperC. For instance if you want to create a menu you could:
BEFORE:
Of course this works but you notice i'm repeating ink every time and also the line break for every line. This is why hyperC has WITH and AND;Code:ink "Menu Title\n";
ink "[1] option 1\n";
ink "[2] option 2\n";
AFTER:
:cool:Code:with ink ; and "\n";
"Menu Title";
"[1] option 1";
"[2] option 2";
and; with;