Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. Missing empty brackets in function call.

Missing empty brackets in function call.

Scheduled Pinned Locked Moved Clever Code
helpquestioncareer
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jummna
    wrote on last edited by
    #1

    Another one (this isn't doing my resume much good, is it?) int some_func () { return flag; } if (some_func) { /* Always end up heree */ } The error is missing out the () after some_func in the if condition. Paul

    R 1 Reply Last reply
    0
    • J Jummna

      Another one (this isn't doing my resume much good, is it?) int some_func () { return flag; } if (some_func) { /* Always end up heree */ } The error is missing out the () after some_func in the if condition. Paul

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #2

      This happens to me with JavaScript.


      Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan

      J 1 Reply Last reply
      0
      • R Rama Krishna Vavilala

        This happens to me with JavaScript.


        Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan

        J Offline
        J Offline
        John Storer II
        wrote on last edited by
        #3

        And in Javascript those kind of errors are *much* more difficult to spot, as functions can behave like objects, so you'll get either an [undefined] or [object] return.

        Earth.USA.Indiana.People["Storer"]["John"][2].PrintHello("Hi!");

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups