DevPinoy.org
A Filipino Developers Community
All Tags » C (RSS)
   

Browse Blog Posts by Tags

Showing related tags and posts for the Blogs application. See all tags in the site
  • C style comments and keyword GO in T-SQL

    I've just encountered a weird error caused by a GO keyword lost inside a commented block using C style comment (/* */). My hunch is that the GO keyword (which is normally on a separate line) is treated differently by T-SQL parser. I will research on this when I do have time.
    Posted to jokiz by jokiz on 06-30-2005
    Filed under: Filed under: ,
  • The (-) operator

    I used to multiply a numeric number to -1 just to get its additive inverse (negative value for positive numbers) and I found out that the (-) operator does it implicitly. int value = 10 int negativeValue = value * -1 int negativeValueAlso = -value
    Posted to jokiz by jokiz on 04-28-2005
    Filed under: Filed under: , , ,
  • Efficient For Loop

    [code language="C#"] for (int i = 0; i < collection.Count; i++) { //do something with collection } [/code] I’ve done this before and for me, the efficient way is to store the Count property of the collection rather than access it everytime for the for loop check, lots of indirection involved (I hope...
    Posted to jokiz by jokiz on 03-17-2005
    Filed under: Filed under: , , ,
  • Assignment in a WHILE condition

    Before, I used to think that in C, the assignment operator always evaluate to true. It is because of this context: [code language="C#"] while (intLeft == intRight) { //do whatever } [/code] If you mistyped the comparison operator (==) as a single equal sign (=) for assignment (of course it will compile...
    Posted to jokiz by jokiz on 01-17-2005
    Filed under: Filed under: , , ,
Page 1 of 1 (4 items)
Copyright DevPinoy 2005-2008