Question about UDP behavior

I have a program that uses a UDP transmitter.
I use UDP because I specifically do not care if anyone is listening.
I use UDP OPEN with a specific port to get a CONN ID.
I use UDP WRITE with the conn ID and a specific DESTINATION IP and DESTINATION PORT when transmitting.
I use UDP CLOSE when the program quits.
This works fine - I can receive the data in the PXI box just fine. 
QUESTION:  If the receiver software is NOT running, does the UDP WRITE actually take up bandwidth on the net?
I can imagine that it might be spewing data out, without regard to whether anyone is listening.
I can also imagine that the receiver might post a signal saying "I'm listening", and the transmitter knows whether someone is listening or not, and doesn't transmit if no one is listening.
So, which is correct?
I'm trying to decide if I need to implement a transmitter on/off control. 
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

When last I looked into UDP it does indeed "wiggle the wire" going out of the back of your PC. What you switch/router does after that is dependent on its configuration.
Note: I got out of low-level network stuff before switch were invented so take my words with a grain of salt.
I was directed to Proceess monitor ( the below utility) when X-shooting a nasty bug by NI Support. Amoung many other things it will show you UDP messages traffic.
Just trying to help,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
ProcessMonitor.zip ‏1248 KB

Similar Messages

  • Question about UDP 16667

    I have a quick question about UDP 16667, it is said in configuration guide that:
    “IPSec encryption can also be configured for the inter-controller mobility messages, in which case port 16667 is used.”
    My question is how to configure IPSec to support it? I can’t find any document describe this. Thanks for any input!

    That is the only command required if you want to enable secure mobility.  So UPD port 16667 will need to be allowed, but 16666 doesn't need to be since you are using secure mobility.  Now depending on how your setup, you will need other ports allowed if required:
    Q. What ports do I need to permit for Lightweight Access Point Protocol (LWAPP) communication when there is a firewall in the network?
    A. You must enable these ports:
    Enable these UDP ports for LWAPP traffic:
    Data - 12222
    Control - 12223
    Enable these UDP ports for Mobility traffic:
    16666 - Secured Mode
    16667 - Unsecured Mode
    Mobility and data messages are usually exchanged through EtherIP packets. IP protocol 97 must be allowed on the firewall to allow EtherIP packets. If you use ESP to encapsulate mobility packets, you have to permit ISAKMP through the firewall when you open UDP port 500. You also have to open the IP protocol 50 to allow the encrypted data to pass through the firewall.
    These ports are optional (depending on your requirements):
    TCP 161 and 162 for SNMP (for the Wireless Control System [WCS])
    UDP 69 for TFTP
    TCP 80 and/or 443 for HTTP or HTTPS for GUI access
    TCP 23 and/or 22 for Telnet or secure shell (SSH) for CLI access

  • Question about MapListener behavior

    can any body tell me about MapListener behavior when it in distributed cache model and in replicated cache model.
    when i type some code implement MapListener interface to change another NamedCache(named 'log') element,
    but MapListener.entryUpdated running under every machine, so 'log' will inserted some equal Data,
    how can do it , let's MapListener.entryUpdated only running one time under a idle machine
    thank you

    In addition to Jon's comment (which is a great way to approach the problem), there are two other possible approaches:
    1) implement a CacheStore and use it to do the processing (i.e. sync write-through or async write-behind processing of those updates)
    2) I don't suggest doing this, but you can elect only one machine that will be responsible for processing the events (more advanced, but allows you to funnel everything through one point if you must)
    Peace.

  • Question about CS3 Behavior

    i am using behavior, how do i make a behavior that when i
    roll over a spot, another spot changes?

    Hi! Could u supply more information. Are you working with
    images?

  • Question about Finder Behavior

    When I go to Finder/Go/Network, sometimes the Finder won't open the Network window, and when it does, the icons are won't stay in icon-view mode. Any ideas what the problem might be?
    Also, when I run System Maintenance Scripts, will they clean up all the partitions? Thanks.

    The maintenance scripts only run on the active startup volume. If you have other partitions that do not have OS X installed, then there's no need to run the maintenance scripts on those volumes. If you do have OS X installed on the other volumes, then you will have to start up from them to run the maintenance scripts on those volumes.
    Note that with Tiger there's little need to force the maintenance scripts to run unless you turn off your computer. If the computer is simply put to sleep, then the scripts will be run automatically at or near that time. With Tiger and later OS X uses launchd to run the maintenance scripts and no longer relies on using cron. Though not significantly different in Leopard there are some improvements in this behavior over those in Tiger. See the following excerpt for The XLab FAQs FAQ on maintenance scripts:
    *Scheduling under Tiger*
    Under Tiger, the new launchd process invokes each script on a schedule specified in a script-specific property list (.plist file) in the /System/Library/LaunchDaemons directory. The specific property list for each script is as follows:
    daily script: com.apple.periodic-daily.plist
    weekly script: com.apple.periodic-weekly.plist
    monthly script: com.apple.periodic-monthly.plist
    How the timer used by launchd handles sleep time has led many to believe that they no longer need to run the maintenance scripts, and that the scripts are run automatically if the Mac was asleep or shutdown at the scheduled time, ala third-party utilities such as Anacron. However, this is untrue.
    While it may appear that launchd executes the maintenance scripts "on the fly" if the computer is asleep or shutdown at the appointed time, this is a side effect of how the timer treats time the computer has spent in sleep mode. The timer used by launchd does not count sleep time. If your Mac is asleep at the scheduled time at which a given script is supposed to run, the script may run later that day, at a time shifted by the amount of time the Mac was asleep. However, if you restart your Mac before the time-shifted execution time, pending events are lost and the script will not run off-schedule: the next chance for the script to run will be at its regularly scheduled time.
    If you regularly restart your Mac and the computer regularly sleeps or is shutdown at the scheduled times, it's possible that the scripts will never run, hence one should still run them manually, say on a weekly basis.
    The sleep time shift is also cumulative. For example, if you don't restart your Mac for weeks or months at a time, but let it sleep when not in use, this can result in:
    The daily script running once every few days or never.
    The weekly script once every few weeks or never.
    The monthly script once every few months or never.
    The time shift in each case is the total amount of time the Mac has spent in sleep since its last restart. If you have a process that writes heavily to the logs, you can wind up devoting good hard disk space to the log files.

  • Question about joption behavior.

    Hi, I'm trying to use JOptionPane to display some component. I tried to set up its size via methods setPreferredSize, setMinimumSize, setSize, but when JOptionPane displays, the component is always small. Suppose I'm using this command JOptionPane.showMessageDialog (null, someCompoennt, ...) for displaying message.
    Is this a standard unbendable behavior or I've got something wrong? If latter is true, please send me a short example source code how to do it properly.
    thanks in advance.
    alfonz.

    reply to all of you: I'm sorry. Really. I just did not want to waste your time, because the answer "joption works well in this case" was enough for me and that was the only reason I did not post code. Next time I will.
    +(Sigh) I regret posting that code now. I feel you'd have learned more if you had posted an SSCCE*. I have little doubt that each and every person who replied to you, could spot the problem in the code and explain why your code was failing.+
    I do not agree with you. Finding your mistake yourself is more valuable then let others to show you where it is. So I just needed to be sure, that mistake is on my side and I'll find it myself. If I fail doing so, then I'll ask for help and hope someone will be willing to help me. I do not know at this moment if I'll be able to fix my mistake, but I have to try it myself or I wont learn anything at all.
    so, these forums should be set up for brain-dead idiots to post
    +"I can't get a JTable/OptionPane/whatever to work, please write it for me"+
    dont exxagerate it - I asked for 20 lines of code including imports and blank lines. Someone, who know how to do the job, is done with it in a minute. Writing finding error explaning it etc. will take more than that and as I said earlier I just want steal as little time as possible. I did not ask "how to break rsa". But again, I understand now that on this forum is needed to post code and next time I'll do it.

  • Question about Aperture behavior on cropped photos

    Hello everyone,
    If I crop a photo in Aperture 3, and then click on the "Auto level" button, will the "auto level" stuff be applied relatively to the whole photo or only to the cropped photo (just like in Photoshop) ?...

    That's not really how I'd want it to work. If you had some portion of a picture you were cropping out precisely because it was, say, so bright white and washed out, and then wanted the rest of the picture to be auto-balanced based on the more appropriate range of shades and colors, you'd want it to be ignoring the part you cropped away. I haven't had a chance to play with that exact scenario though, but if what you say is true, what is the solution to a scenario like that? Round-trip it to PS to really crop away the unwanted part?
    Duncan

  • Question about the CSS behavior when using layer 3 sticky and sticky table

    Hi everyone,
    I have a question about the CSS behavior when using layer 3 sticky and sticky table is full.
    If I configure layer 3 sticky and specify the inactivity timeout as below, how does the CSS
    handle subsequent needed sticky requests ?
    advanced-balance sticky-srcip
    sticky-inact-timeout 30
    CSS document says that
    Note:
    If you use the sticky-inact-timeout command to specify the inactivity timeout
    period on a sticky connection, when the sticky table becomes full and none of
    the entries have expired from the sticky table, the CSS rejects subsequent
    needed sticky requests.
    My question is what is the next reaction by doing the CSS if the CSS is in the
    following condition:
    when the sticky table becomes full and none of the entries have expired from
    the sticky table, the CSS rejects subsequent needed sticky requests
    Does CSS just rejects/drops subsequent needed sticky requests ?
    or
    Does CSS does not stick subsequence requests to particular service but CSS forward
    subsequence requests with round-robin basis ? which means if the sticky table is full,
    the CSS just works round-robin load balancing fashion for subsequence requests ?
    Your information would be appreciated.
    Best regards,

    Hello,
    There is a good document explaining this on Cisco web site
    http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_tech_note09186a0080094b4b.shtml
    It depends if the sticky-inact-timeout is used or not. If not, it's FIFO (the oldest entry in the sticky table is removed). If yes, the CSS will reject the next sticky request.
    Rgds,
    Gaetan
    Rgds
    Gaetan

  • Question about Page Builder behavior - how to get a "please wait message" ?

    Hi all together,
    I got a question about Portal Framework / Page Buider handling iView Integration.
    We are working with a lot of App Integrator iViews and often the pages includes with app integrator are loading longer than the rest of the portal. So there is the idea to put in a "please wait while loading message" for the enduser.
    I analysed the html code, the page builder is generating and foud out 3 diffrent approaches how the page buider is rendering the IFRAME with the integrated application configured with an app integrator iView.
    My question is how can I influence this behavior to put a "please wait while loading message"?
    Different types of iView integration in the client I have seen:
    a) direct loading of the content in the IFRAME (<iframe id="" ... scr="/mysource">)
    b) Filling the iframe with 'about:blank' and loading the content later by filling a form with JS
         ( <iframe id="" .... scr="about:blank">and after the iframe  <form id="" action="mysource" ...>
    c) Filling the iframe with a html file from the portal layout and loading the content later by filling a form with JS (similar to b)
         ( <iframe id=""" ....scr="/irj/portalapps/com.sap.test.mylayout/html/blank.html>
    I checked that variant b) is getting generated when loading a page with different components on the side (not only the app integrator iview) and variant c) is generated when just one app integrator iView is positioned (no portal page).
    Goal: To get the "please wait picture" I want to know how to get variant c) in cases of different elements on one page
    So I would be able to put this picture on the HTML-Page in the Portal layout (blank.html)
    Hope, someone with a deep portal / page builder know-how can help me out!
    Another way: Does anybody knows another way how to put a "please wait message" while app integrator application is not loaded yet?
    Thanks in Advance and kind regards,
    Jens
    Edited by: Jens Kohne on Nov 24, 2010 9:08 AM

    Hi Jens,
    there are several reasons why you don't get the loading animation:
    Web Dynpro ABAP: https://service.sap.com/sap/support/notes/1432358 -> missing configuration
    Wrong height size for iView: https://service.sap.com/sap/support/notes/1358494 -> alter configuration of the iFrame height (loading animation gets displayed, but is hidden)
    FPN, BSP, BEx: https://service.sap.com/sap/support/notes/1290995 -> AI isn't showing the animation because of performance considerations. I guess that is your case. Depending on your portal version this is a simple service configuration or involves some customization.
    br,
    Tobias

  • Two questions about SG300 DHCP server

    Hi,
    I have two questions about the DHCP server on the SG300:
    On the Address Binding page, what does the "Declined" state mean? I have a NAS device that won't pull an address, and I think that the entry with a state of "Declined" corresponds to this device. It was previously pulling an address from a RV180, so the only difference is that it is now connected to the SG300. I worked around this by manually setting the address on the NAS device, but this won't scale if I run into a lot of other devices that can't pull an address.
    I configured a static address binding for a WAP321 and found that instead of pulling the configured address that it pulled a dynamic address. I checked the Address Binding page and see that the dynamic entry that corresponds with the WAP321 has a Client Identifier rather than a MAC address. I changed the static entry for the WAP321 to use the client identifier displayed in the dynamic entry, and now the WAP321 pulls the configured static address. Is this expected behavior?
    Thanks,
    Bob

    With the SX300/500 it is required the client identifier, it doesn't automatically insert it. If static DHCP is made on the switch and you didn't need client identifier, that is more or less fortunate behavior for you
    So to answer this question, the expected behavior is to configure client identifier for static DHCP entry.
    -Tom
    Please mark answered for helpful posts
    http://blogs.cisco.com/smallbusiness/

  • Question about the programming of a legend

    Hello everybody,
    I have a question about the programming of a waveform's legend. I
    already asked here in this forum about the legend programming (03)
    months ago.
    I went satisfied but I ve just noticed that this code
    (See Code old_legend_test.llb with main.vi as main function) operates a
    little different from my expectances.
    Therefore I have a new question and I want to know if it
    is possible by labview programming to plot and show, on a waveform
    chart, a signal with activ plot superior to zero (0) without to be
    obliged to plot and show a signal with activ plot equal to zero (0) or
    inferior to the desired activ plot.
    I give you an example
    of what I m meaning. I have by example 4 signals (Signal 0, 1, 2 and 3)
    and each signal corresponds respectively to a channel (Chan1, Chan2,
    Chan3, Chan4). I want to control the legend (activ plot, plot name and
    plot color) programmatically. Is it possible with labview to plot signal
    1 or 2 or 3 or (1, 3) or (2,3) or (1,2,3) or other possible combination
    without to active the signal with the corresponding activ plot zero
    (0)?
    Let see the labview attached data
    (new_legend_test.llb with main.vi as main function). When I try to
    control the input selected values again I get them back but I don't
    understand why they have no effect on the legend of my waveform chart.
    Could somebody explain me what I m doing wrong or show me how to get a
    correct legend with desired plots? Thank by advance for your assistance.
    N.B.
    The
    both attached data are saved with labview 2009.
    Sincerly,PrinceJack
    Attachments:
    old_legend_test.llb ‏65 KB
    new_legend_test.llb ‏65 KB

    Hi
    princejack,
    Thanks for
    posting on National Instruments forum.
    The behavior
    you have is completely normal. You can control the number of row displayed in
    the legend and this rows are linked to the data you send to your graph. Thus,
    if you have 3 arrays of data, let say chan1, chan2 and chan3, you can choose
    which data you want to display in your graph using the property node (Active
    plot and visible). But for the legend as you send 3 plots there is an array of
    the plot name [chan1, chan2, chan3] and you can display 0, 1, 2 or 3 rows of
    this array but you cannot control the order in this array! So, to be able to
    change this array you have to only send data you need to you graph. I'm not
    sure my explanations are clear so I have implemented a simple example doing
    that.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/
    Attachments:
    GraphLegend.vi ‏85 KB

  • Questions about PDF exporting with InDe CS5.5

    Hey all,
    A couple questions about exporting to PDF from the latest version of InDe.
    First, I have noticed that it seems to take a lot longer to get to a PDF. Any suggestions for how to speed up the process? It took 8 minutes or so to generate a low-res PDF (for print) of a 24pp document with a few placed images and vector graphics. Wow, that's a long time to wait, especially for a proof.
    Second, the background task... if I get it going on making that 8-minute PDF and then work some more on the document, what exactly is in the PDF? Usually I save before making a PDF or printing. So, is the last version saved what will be in the PDF?
    (As an aside, this ability to work on the doc while generating a PDF seems kind of weird. Generally one makes a PDF for proofing, or even for printing, when all the changes have been made and everything is "final". So, I see no benefit to being able to work on my document while it's making a PDF, as I'm probably finished making revisions for the time being. I have to say that I kind of like the progress bar you get when you make an interactive PDF, as you know you can't work on the document when that's on the screen... )
    Thanks as always.

    First, I have noticed that it seems to take a lot longer to get to a PDF. Any suggestions for how to speed up the process? It took 8 minutes or so to generate a low-res PDF (for print) of a 24pp document with a few placed images and vector graphics. Wow, that's a long time to wait, especially for a proof.
    Yes, this is abnormally long (and too long), something is wrong. What's the full version of InDesign you are running, as reported by holding down Cmd or Control and selecting About InDesign?
    Second, the background task... if I get it going on making that 8-minute PDF and then work some more on the document, what exactly is in the PDF? Usually I save before making a PDF or printing. So, is the last version saved what will be in the PDF?
    Saving is not related. InDesign makes a database snapshot of your document the moment you begin the PDF export, and makes the export relative to that snapshot, regardless of edits you continue to make during the export process, and regardless of saving. Of course saving first is a good idea, for several reasons, not the least of which it sounds like something's fairly seriously wrong with your document or your InDesign installation.
    We recommend you trash your preferences and export your document to IDML and see if either of those things changes this 8-minute behavior...err, assuming you're running 7.5.2.318.
    (As an aside, this ability to work on the doc while generating a PDF seems kind of weird. Generally one makes a PDF for proofing, or even for printing, when all the changes have been made and everything is "final". So, I see no benefit to being able to work on my document while it's making a PDF, as I'm probably finished making revisions for the time being. I have to say that I kind of like the progress bar you get when you make an interactive PDF, as you know you can't work on the document when that's on the screen... )
    Yeah, I think the primary benefit is if you are likely to work on 2 or more files in parallel, so you can finish A and export A and then switch to B. If you'd like a dialog box to pop up when export is done, check out my exportPop script from this post: ANN: automatic dialog after background export (exportPop.jsx.

  • Question about LRU in a replicated cache

    Hi Tangosol,
    I have a question about how the LRU eviction policy works in a replicated cache that uses a local cache for its backing map. My cache config looks like this:
    <replicated-scheme>
    <scheme-name>local-repl-scheme</scheme-name>
    <backing-map-scheme>
    <local-scheme>
    <scheme-ref>base-local-scheme</scheme-ref>
    </local-scheme>
    </backing-map-scheme>
    </replicated-scheme>
    <local-scheme>
    <scheme-name>base-local-scheme</scheme-name>
    <eviction-policy>LRU</eviction-policy>
    <high-units>50</high-units>
    <low-units>20</low-units>
    <expiry-delay/>
    <flush-delay/>
    </local-scheme>
    My test code does the following:
    1. Inserts 50 entries into the cache
    2. Checks to see that the cache size is 50
    3. Inserts 1 additional entry (as I understand it, this should cause the eviction logic to kick-in)
    4. Checks the cache size again, expecting it to now be 20
    With HYBRID and LFU eviction policies, the above logic works exactly as expected. When I switch to LRU however, the code at step 2 always returns a value significantly less than 50. All 50 inserts appear to complete successfully, so I can only assume that some of the entries have already been evicted by the time I get to step 2.
    Any thoughts?
    Thanks.
    Pete L.
    Addendum:
    As usual, in attempting to boil this issue down to its essential elements, I left out some details that turned out to be important. The logic that causes the condition to occur looks more like:
    1. Loop 2 times:
    2. Create named cache instance "TestReplCache"
    3. Insert 50 cache entries
    4. Verify that cache size == 50
    5. Insert 1 additional entry
    6. Verify that cache size == 20
    7. call cache.release()
    8. End Loop
    With this logic, the problem occurs on the second pass of the loop. Step 4 reports a cache size of < 50. This happens with LRU, LFU, and HYBRID-- so my initial characterization of this problem is incorrect. The salient details appear to be that I am using the same cache name each pass of the loop and that I am calling release() at the end of the loop. (If I call destroy() instead, all works as expected.)
    So... my revised question(s) would be: is this behavior expected? Is calling destroy() my only recourse?
    Message was edited by: planeski

    Robert,
    Attached are my sample code and cache config files. The code is a bit contrived-- it's extracted from a JUnit test case. Typically, we wouldn't re-use the same cache name in this way. What caught my eye however, was the fact that this same test case does not exhibit this behavior when running against a local cache directly (as opposed to a repl cache backed by a local cache.)
    Why call release? Well, again, when running this same test case against a local cache, you have to call release or it won't work. I figured the same applied to a repl cache backed by a local cache.
    Now that I understand this is more a byproduct of how my unit tests are written and not an issue with LRU eviction (as I originally thought), it's not a big deal-- more of a curiosity than a problem.
    Pete L.<br><br> <b> Attachment: </b><br>coherence-cache-config.xml <br> (*To use this attachment you will need to rename 545.bin to coherence-cache-config.xml after the download is complete.)<br><br> <b> Attachment: </b><br>LruTest.java <br> (*To use this attachment you will need to rename 546.bin to LruTest.java after the download is complete.)

  • STS: Few Questions about STS ?

    Hi All,
    Right now, I'm working on STS for IP.
    I have some questions about it:
    1. Every time I execute t-code BPS_STS_START, it launch the STS Web Application with different port and HTTP.
    The port should be 8444, and HTTP should be HTTPS .
    I've already checked on t-code: SE80 to TUNGUSKA htm, and see on the properties on it. I got it has correct port and HTTPS.
    How do I fix up this problem ? Do you know what the solution is ?
    2. When I execute sending email initially, why does it always send the email to manager ?
    Whereas It doesn't have the upper level.
    How can I setup it? Is it setup with the Authorization ?
    Thanks a lot all . Appreciate your suggestion about my questions.
    Best regards,
    Daniel N.

    Hi Lucimar,
    Thanks a lot for your kind help.
    If you don't mind, I have another questions.
    When I run t-code: BPS_STS_START. It will launch the browser with this url: https://sapdsb6.xxx.yyy.com:8606/sap/public/myssocntl?sap-client=100
    But it just gives me blank web-page.
    My question is whether it's normal behavior from STS ? I thought it will distribute email notification to start planning, but it's not, when I check on t-code: SOSV, it doesn't give any email queue to be distributed.
    2.
    Btw, regarding my question no. 2, how can I setup it in t-code: BPS_TC at Determine date, Person Resp., Layouts ? Where can I setup it ?
    Would you kindly help me what I have to do ?
    Thanks a lot and have a good day,
    Best regards,
    Daniel N.

  • Question about size of ints in Xcode

    Hello. I have a a few quick questions about declaring and defining variables and about their size and so forth. The book I'm reading at the moment, "Learn C on the Mac", says the following in reference to the difference between declaring and defining a variable:
    A variable declaration is any statement that specifies a variables name and type. The line *int myInt;* certainly does that. A variable definition is a declaration that causes memory to be allocated for the variable. Since the previous statement does cause memory to be allocated for myInt, it does qualify as a definition.
    I always thought a definition of a variable was a statement that assigned a value to a variable. If a basic declaration like "int myInt;" does allocate memory for the variable and therefore is a definition, can anyone give me an example of a declaration that does not allocate memory for the variable and therefore is not a definition?
    The book goes on, a page or so late, to say this:
    Since myInt was declared to be of type int, and since Xcode is currently set to use 4-byte ints, 4 bytes of memory were reserved for myInt. Since we haven't placed a value in those 4 bytes yet, they could contain any value at all. Some compilers place a value of 0 in a newly allocated variable, but others do not. The key is not to depend on a variable being preset to some specific value. If you want a variable to contain a specific value, assign the value to the variable yourself.
    First, I know that an int can be different sizes (either 4 bytes or 8 bytes, I think), but what does this depend on? I thought it depended on the compiler, but the above quote makes it sound like it depends on the IDE, Xcode. Which is it?
    Second, it said that Xcode is currently set to use 4-byte ints. Does this mean that there is a setting that the user can change to make ints a different size (like 8 bytes), or does it mean that the creators of Xcode currently have it set to use 4-byte ints?
    Third, for the part about some compilers giving a newly allocated variable a value of 0, does this apply to Xcode or any of its compilers? I assume not, but I wanted to check.
    Thanks for all the help, and have a great weekend!

    Tron55555 wrote:
    I always thought a definition of a variable was a statement that assigned a value to a variable. If a basic declaration like "int myInt;" does allocate memory for the variable and therefore is a definition, can anyone give me an example of a declaration that does not allocate memory for the variable and therefore is not a definition?
    I always like to think of a "declaration" to be something that makes no changes to the actual code, but just provides visibility so that compilation and/or linking will succeed. The "definition" allocates space.
    You can declare a function to establish it in the namespace for the compiler to find but the linker needs an actual definition somewhere to link against. With a variable, you could also declare a variable as "extern int myvar;". The actual definition "int myvar;" would be somewhere else.
    According to that book, both "extern int myvar;" and "int myvar;" are declarations, but only the latter is a definition. That is a valid way to look at it. Both statements 'delcare' something to the compiler, but on the second one 'define's some actual data.
    First, I know that an int can be different sizes (either 4 bytes or 8 bytes, I think), but what does this depend on? I thought it depended on the compiler, but the above quote makes it sound like it depends on the IDE, Xcode. Which is it?
    An "int" is supposed to be a processor's "native" size and the most efficient data type to use. A compiler may or may not be able to change that, depending on the target and the compiler. If a compiler supports that option and Xcode supports that compiler and that option, then Xcode can control it, via the compiler.
    Second, it said that Xcode is currently set to use 4-byte ints. Does this mean that there is a setting that the user can change to make ints a different size (like 8 bytes), or does it mean that the creators of Xcode currently have it set to use 4-byte ints?
    I think that "setting" is just not specifying any option to explicitly set the size. You can use "-m32" or "-m64" to control this, but I wouldn't recommend it. Let Xcode handle those low-level details.
    Third, for the part about some compilers giving a newly allocated variable a value of 0, does this apply to Xcode or any of its compilers? I assume not, but I wanted to check.
    I don't know for sure. Why would you ask? Are you thinking of including 45 lines of macro declarations 3 levels deep to initialize values based on whether or not a particular compiler/target supports automatic initialization? Xcode current supports GCC 3.3, GCC 4.0, GCC 4.2, LLVM GCC, CLang, and Intel's compiler for building PPC, i386, and x86_64 code in both debug and release, with a large number of optimization options. It doesn't matter what compiler you use or what it's behavior is - initialize your variables in C.

Maybe you are looking for

  • MIcrophone class not displaying decklink capture card in names

    hi, I have a desktop application in which i have an option to select the audio video devices to publish the stream.The Camera.names displaying the decklink capture card .But Microphone.names is not showing the name. Is there anyway to get it in the l

  • Can you mix roaming and extended airport networks as such:

    I have my main aebs connected to the cable modem.  I want to conenct several airport expresses to the aebs via powerlien adapters to form a roaming network.  One airport express I cant connect conveniently to powerline so I want to set it up to exten

  • Malfunctioning Java Applet

    Hello there, I am a New To Java Technology user of java.sun.com. I have browsed over the tutorials online. After following the instructions on appleting, my applet does not display the text it's suppost to, i.e the string inputed during programming d

  • Can't install os x on new ssd

    I just installed a new SSD in my mid 2010 macbook pro. Everytime I try to reinstall os x ML, i get an error that says, An error occured while preparing the installation. Try running this pplication again. Everytime I try this the same error pops up.

  • Sockets in J2ME

    Hi friends I want to use Sockets in my J2ME application. How can use sockets? I am trying to connect to remote server. So is there need to write server side program. I have written a server side program which uses JAVA sockets, And it listens for soc