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. General Programming
  3. C / C++ / MFC
  4. what does IN mean when declaring variables?

what does IN mean when declaring variables?

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 3 Posters 0 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.
  • S Offline
    S Offline
    scottwalk
    wrote on last edited by
    #1

    I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.

    T D 2 Replies Last reply
    0
    • S scottwalk

      I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.

      T Offline
      T Offline
      Tom Wright
      wrote on last edited by
      #2

      IN means that is something your passing to the function. OUT is something that will return from the function. Laymans terms Tom Wright tawright915@yahoo.com

      S 1 Reply Last reply
      0
      • T Tom Wright

        IN means that is something your passing to the function. OUT is something that will return from the function. Laymans terms Tom Wright tawright915@yahoo.com

        S Offline
        S Offline
        scottwalk
        wrote on last edited by
        #3

        Sweet. Thanks. ..so, let's pretend for a minute that I'm not a layman(which I am). What are the gory details?

        T 1 Reply Last reply
        0
        • S scottwalk

          I'm new to programming and am having trouble figuring out what the following syntax means when defining a function and it's arguments: VOID myFunc( IN PCHAR stuff, OUT BOOLEAN test ); What is the purpose of IN, OUT? What is this called? I haven't been able to find a good explanation because these are such common words, and I'm not sure what this syntax is called. Thank you.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          scottwalk wrote: What is the purpose of IN, OUT? Basically it indicates when the variables will contain valid information. IN indicates that the variable has valid information when calling the function; OUT indicates that the variable will have valid information after the called function returns. See "pass by reference" and "pass by value" for related information.


          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          S 1 Reply Last reply
          0
          • S scottwalk

            Sweet. Thanks. ..so, let's pretend for a minute that I'm not a layman(which I am). What are the gory details?

            T Offline
            T Offline
            Tom Wright
            wrote on last edited by
            #5

            No gory details....sometimes developers here speak over new developers heads. It's kinda like they want to break everything down to the Greek language (kinda like a preacher in a pulpit)(Sometimes it's easier in english than when you break it down to something else). Which is nice, but sometimes you have to tell it in easier terms and then when that person understands explain why (in Greek :) ) Tom Wright tawright915@yahoo.com

            1 Reply Last reply
            0
            • D David Crow

              scottwalk wrote: What is the purpose of IN, OUT? Basically it indicates when the variables will contain valid information. IN indicates that the variable has valid information when calling the function; OUT indicates that the variable will have valid information after the called function returns. See "pass by reference" and "pass by value" for related information.


              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              S Offline
              S Offline
              scottwalk
              wrote on last edited by
              #6

              Excellent. Even though I'm a beginner, I can still speak g(r)eek now and then. :)

              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