From: Pascal B. <pa...@dy...> - 2001-02-24 16:00:38
|
about the switch thingie. I tried it and it seems to be slower then the if statements .. Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Michael Pemberton > Verzonden: zaterdag 24 februari 2001 15:23 > Aan: dyn...@li... > Onderwerp: [Dynapi-Dev] annoyances : ) > > > I have found the following recurring syntax glitches in the api and am > getting tired of hacving to manually alter the code every time it gets > updated. > > is there any reason why { } segments do not always have a ; after the > closing } ? > also on line 257 and 278 there is a ; in the wrong place and the nest > line can be merged with it. > eg: else if (dlyr.w!=null && dlyr.h!=null); > s+=' clip:rect(0px '+dlyr.w+'px '+dlyr.h+'px 0px);'; > should become: > else if (dlyr.w!=null && dlyr.h!=null) s+=' clip:rect(0px > '+dlyr.w+'px '+dlyr.h+'px 0px);'; > > additionally, there are still a few of { } lines that are not needed. > If and 'if' statement or 'for' statement only executes one line, the {} > is not needed. > > also, are all the blank lines needed? it makes comparing line #'s hard > once I remove them. > > in closing, what are the chances of the browsers being given a numerical > value that can then be used in a case switch instead of a series of > if-else statements. > > This was mentioned as one of the possible speed increased available in > almost all browsers. > eg. is.browserID = 1 (ie4), 2 (ns4), 3(ie5), 4(ie55), 5(ns6) > Static (Browsers.IE4 = 1, .NS4=2 etc.) > > I know it's only a series of minor details but every little bit counts. > -- > Michael Pemberton > mp...@ph... > ICQ: 12107010 > > > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > |