ID:137855
 
okay, i was writing some code, and i used osme nested ifs here and there, and a few else, ect... however, the code did not work how i wanted it to. so i commented some of the if's outt o see what it would do. upon compiling i realised that the indention for the whole friggin proc was out of place. so i hada go down several lines, and fix everything to the proper indention. then i had to go back thru, after uncommenting the if's, and re-ident them to their proper format.

now to my suggestion. i know you guys are bent on using indentions, which is all cool. it works for me as well. but i think that you should make it to where if you use brackets, such as

if(usr.name="Word"){
statment
statment
}

you shoudl ignore extra white space, and indetions like in C/C++. i kinda like it that way, cuz I tend to use brackets cuz i am used to using them, and sometime i need to temporarily take out code to test something, wihtout haivng to re-format the whole proc. in C++ you could do this:


if(usr.name="Word") {
statment
statment
}

if you wanted to(which obviously would be pointless), but in DM you can't. its just a suggestion, its cool if you guys don't want to hassle with it. but it may make osme bug fixing a bit easier. i even sometimes have to temporarily add if and else statements for testinga nd the such to see whats going on. wich atgain makes me have to re-format the whoel proc. and some of these procedures get pretty long as well.

and one more suggestion. I nice typdef enum could help out to. (less you can already do this, please inform me how)

thanks.
On 7/3/01 7:20 am XgavinX wrote:
now to my suggestion. i know you guys are bent on using indentions, which is all cool. it works for me as well. but i think that you should make it to where if you use brackets, such as

It does support brackets. Try it.

In response to Deadron

It does support brackets.

I think he was complaining about the fact that DM allows you to use brackets but it still requires consistent indentation. Although that may be annoying in some cases, it can also save you from running into nasty problems where the code looks fine, but it is being interpreted completely differently than what you are thinking, because there is a missing set of brackets somewhere.

Anyway, I think once you get used to it, it's actually not as bad as you think. For example, the case mentioned where you want to remove an 'if' or something for temporary debugging purposes can usually be gotten around by commenting out the 'if' and adding <code>if(1)</code> or <code>if(0)</code> in its place.

Also, be sure to take advantage of the fact that you can mark a whole block of code and hit tab or shift-tab to change the indentation. That's essential!

--Dan

In response to Dan
On 7/3/01 11:34 am Dan wrote:
It does support brackets.

I think he was complaining about the fact that DM allows you to use brackets but it still requires consistent indentation. Although that may be annoying in some cases, it can also save you from running into nasty problems where the code looks fine, but it is being interpreted completely differently than what you are thinking, because there is a missing set of brackets somewhere.

Anyway, I think once you get used to it, it's actually not as bad as you think. For example, the case mentioned where you want to remove an 'if' or something for temporary debugging purposes can usually be gotten around by commenting out the 'if' and adding <code>if(1)</code> or <code>if(0)</code> in its place.

Also, be sure to take advantage of the fact that you can mark a whole block of code and hit tab or shift-tab to change the indentation. That's essential!

--Dan


thanks guys. yeah, i already knew it supported brackets. its not THAT big of a deal. but i had no idea you coudl highlight a block of code. thanks, i'll most likely get used to it.