Bit of a wierd question but here goes
Is there a version of c that doesnt require a semicolon at the end of each line?
this seem dumb to me since 90% of command fit on one line forcing u to insert unnecesary characters
I dunno it just seems cumbersome....
I am afraid there is no any version of C that doesn't require a semicolon at the end of each line.
thx :'( :'( :'( :(
If you really wanted to, you could write a little preprocessor to insert all the semicolons for you, after checking that a line doesn't end in a {
Quote from: bieber on June 29, 2010, 07:16:57 PM
If you really wanted to, you could write a little preprocessor to insert all the semicolons for you, after checking that a line doesn't end in a {
That would work great with for() and while(), etc
while(1);
{
puts("Will it get here?");
}
Quote from: clive on June 29, 2010, 08:11:48 PM
Quote from: bieber on June 29, 2010, 07:16:57 PM
If you really wanted to, you could write a little preprocessor to insert all the semicolons for you, after checking that a line doesn't end in a {
That would work great with for() and while(), etc
while(1);
{
puts("Will it get here?");
}
Assuming you put the { on the same line as the loop declaration ;) Of course it would be a lot more complicated if you wanted to do it right...you'd need to check for things like opening loop bodies, figure out whether you're looking at a function prototype or a declaration, etc. It's doable, but obviously the sane solution is to just type your semicolons
Quote from: bieber on June 29, 2010, 08:19:36 PM
the sane solution is to just type your semicolons
The sane solution is to use assembler instead of C. But I see that you don't have a high opinion of assembly: "Robert Bieber (http://particlesim.sourceforge.net/developers.html) was once a Windows developer,
hacking out code in Assembly. Now, he's a devout GNU/Linux user, and champion of the Free Software cause" :wink
By the way, you revived a four year old thread...
Quote from: jj2007 on June 29, 2010, 08:26:24 PM
The sane solution is to use assembler instead of C. But I see that you don't have a high opinion of assembly: "Robert Bieber (http://particlesim.sourceforge.net/developers.html) was once a Windows developer, hacking out code in Assembly. Now, he's a devout GNU/Linux user, and champion of the Free Software cause" :wink
Don't be silly, I think Assembly is a lot of fun. I do most of my work in higher level languages nowadays, but that doesn't mean I don't know my way around an assembler. Regardless, the topic of the thread was C syntax, and obviously the OP had some reason for choosing C over assembly. Perhaps they need to write portable code? C vs. Assembly is completely off-topic, as is you randomly digging up some silly old project of mine...
Quote
By the way, you revived a four year old thread...
Woops, I didn't realize just how little goes on in this subforum...I never thought there'd be a years-old thread on the front-page. I'll keep an eye out in the future.
And hey, you dug up a four year old bio (where
did you find that, anyways?), so I guess we're even
I'm not sure if I am helping or not, but when using a language, it's best to stick the specifications for good source code. I'm not sure if any of you are understanding me. So yeah, there are my two cents.
Quote from: Radio Ga Ga on July 30, 2010, 08:27:50 AM
I'm not sure if I am helping or not, but when using a language, it's best to stick the specifications for good source code. I'm not sure if any of you are understanding me. So yeah, there are my two cents.
:U
#define begin {
#define end }
#define procedure void
procedure start()
begin
end;
That was 3 cts, drizz :bg
Quote from: drizz on July 30, 2010, 12:52:14 PM
#define begin {
#define end }
#define procedure void
procedure start()
begin
end;
yep... that's pascal :bg
Quote from: drizz on July 30, 2010, 12:52:14 PM
#define begin {
#define end }
#define procedure void
procedure start()
begin
end;
For a while I was thinking about using these #defines to avoid
the nasty curley brackets I can't find on my keyboard, but eventually
I was back to ALT+123/125 to get them. :P
on this keyboard, they are shifted versions of the square bracket keys
but - you can always use copy/paste instead of a funky key-sequence
you might be able to use some otherwise not-often-used characters in their place (like @ and Z or something)
then, do a find-replace to make them braces
Quote from: frktons on July 30, 2010, 06:21:05 PM
For a while I was thinking about using these #defines to avoid
the nasty curley brackets I can't find on my keyboard, but eventually
I was back to ALT+123/125 to get them. :P
On an Italian keyboard, try
Shift AltGr [ to get {
Quote from: jj2007 on July 31, 2010, 07:28:32 AM
Quote from: frktons on July 30, 2010, 06:21:05 PM
For a while I was thinking about using these #defines to avoid
the nasty curley brackets I can't find on my keyboard, but eventually
I was back to ALT+123/125 to get them. :P
On an Italian keyboard, try Shift AltGr [ to get {
It works!!! Thanks JJ for the shortcut :U
Quote from: dedndave on July 31, 2010, 02:57:18 AM
on this keyboard, they are shifted versions of the square bracket keys
but - you can always use copy/paste instead of a funky key-sequence
you might be able to use some otherwise not-often-used characters in their place (like @ and Z or something)
then, do a find-replace to make them braces
Yes Dave. This is something I've thought about for a while. Sometime I just
copy and paste the curleys or the AT symbols as well. Better to have more than
one solution anyway :P
i wonder if braces make a different sound in Italiano :lol
(http://4.bp.blogspot.com/_MRtcBY11zgM/S2oyi29kWtI/AAAAAAAAAOY/ZCMBa0KTfLc/s1600/italian%2Bgestures3.jpg)
Quote from: dedndave on August 02, 2010, 05:06:20 PM
i wonder if braces make a different sound in Italiano :lol
Well, yes! Really. It sound like "Graffe" that is quite a noisy and nasty sound indeed. :lol