Probably ot here - but i was NOT saying it was silly, I agree you can count on ED and i do use ED / AE every day i am working on a u2 box, but when it comes to sitting down and writing, or debugging some code i think most people do use a more visual editor, the one that comes free with u2, (old unidebugger or the new eclipse based one) does indeed lock the item so no worries there.
The point I was making is that capitalising certain parts of your code is not as necessary as it stands out anyway in a visual editor, and also that such editors allow case insensitive searching as well. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ron Hutchings Sent: 25 June 2009 13:45 To: [email protected] Subject: Re: [U2] Mixed Case UV Basic Programming Standards. Yeah, no one would be silly enough to still be using ED. Just because you can count on it being on every client machine since it is delivered with the standard system. Nobody could possibly be more productive in ED then any of the color sensitive editors that may not lock records while two people are in the same record. > From: [email protected] > To: [email protected] > Date: Thu, 25 Jun 2009 10:58:55 +0100 > Subject: Re: [U2] Mixed Case UV Basic Programming Standards. > > An important point there from Brian on editors, yes the editors we use (no > one writes code in ed do they?) will colour highlight verbs, literals, > comments, variables etc + do case insensitive searches.. > > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Brian Leach > Sent: 25 June 2009 10:14 > To: 'U2 Users List' > Subject: Re: [U2] Mixed Case UV Basic Programming Standards. > > Hi > > I use mixed case using the same capitalization as for Delphi and VB (rather > than camelCase for C# and Java). > > OpenSeq > NumberOfFields = DCount(SomeVariable, @FM) > > However I use upper case to distinguish things that are 'special' e.g. > equate literals, file and select variables, common variables and compiler > directives. That way they stand out. > > I also use upper case for STOP and the main RETURN from an external > subroutine, which helps to distinguish it from the Return from a local > GoSub. > > I don't worry about searching since the editors I use are capable of > searching case-independently, and you can always write an IDescriptor to do > an UPCASE(@RECORD) if you want to search in a source file. In fact, > generally I find doing a SELECT with a LIKE clause on that is faster than > using the SEARCH command. > > There should be no need to do anything special to format your comments since > any editor worth using will distinguish these (as a bare minimum). I have a > simple 'autodoc' markup in the comments that makes it easy to generate > technical docs. > > So, putting it all together: > > PROGRAM ShowStuff > *--------------------------------------------------------------------- > * @@Name : ShowStuff > * @@Project : Demo > * (other autodoc header info here) > *--------------------------------------------------------------------- > * @@Info{ > * Shows some stuff. > * <b>And some other comments in here with HTML markups</b> > * } > *--------------------------------------------------------------------- > * (other autodoc comments here: modifications, keywords, todo etc. > *--------------------------------------------------------------------- > * version stamp goes in here - assigned to a variable so it compiles into > * the object and I can then rip it from the string table. > > VERDATA = "Version=001002003;" > VERDATA:= "VerDate=12345;" > VERDATA:= "VerDesc=Short Description here;" > (etc) > > *--------------------------------------------------------------------- > $INCLUDE BOOK_TITLES.h > > Open "BOOK_TITLES" To TITLES Else > Crt "Cannot open the TITLES File" > RETURN > End > > Execute "SSELECT BOOK_TITLES", SELECT. > SLIST > Fin = @False > Loop > ReadNext TitleId From SLIST Else > Fin = @True > End > Until Fin Do > GoSub ShowISBN > Repeat > > RETURN > > *---------------------------------------------------------------------- > * ShowISBN: show the title id, ISBN and price > *---------------------------------------------------------------------- > ShowISBN: > Read TitleRec From TITLES,TitleId Then > Crt TitleId, TitleRec<BOOK_TITLES.ISBN>, > OConv(TitleRec<BOOK_TITLES.PRICE>,"MD2") > End > Return > > > I find it much more legible, since I spent at least half of my life in > client languages. But I understand the point of view of those raised on > upper case only who don't use modern (grin) languages, and may initially > find it confusing. It's just a question of what you're used to. > > Incidentally, this has evolved over the years. I started off upper case (no > other choice back then), went to lower case in the 'C/UNIX' age, and then > camelCase before settling on this style. When I go back to older code I can > see that this one works best. > > > But the main thing is to be consistent with your style and use a good > editor. > > > Brian > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users _________________________________________________________________ Windows LiveT: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009 _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
