Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • passing arguments

    I am using bayesmh in Version 14.1but having problems passing an argument was per below

    name: <unnamed>
    log: /Users/ianferguson/Library/Application Support/Stata/ado/plus/cred.smcl
    log type: smcl
    opened on: 16 Feb 2016, 14:50:34

    . sysuse auto
    no; data in memory would be lost
    r(4);

    . sysuse auto,clear
    (1978 Automobile Data)

    . do cred.do mpg
    file cred.do not found
    r(601);

    . do cred.do mpg

    . program cred
    1. version 14.1
    2. args xx
    3. summarize ‘xx’, meanonly
    4. */ etc */
    . end

    .
    end of do-file

    . cred mpg
    ‘xx’ invalid name
    r(198);

    Why is ‘xx’ an invalid name?


  • #2
    Because `xx' is not the right way to de-reference the macro xx created by -args-. To de-reference a macro, you have to start with the left-quote character, which is different from the regular quotation mark. On a US keyboard it is located to the left of the 1! key. It should be `xx', not 'xx'.

    Comment


    • #3
      Thanks. That is what I thought and had previously tried without success. I also tried alt ] and alt shift ] without success.

      But in updating my Stata 14 on my iMac (my main machine) just now, I get a message that 'Some Unicode functions will not behave correctly because ICU dat file icudt54l.dat cannot be found at directory etc etc". I guess I will have to update the ICU package, if I can figure it out.

      I also updated Stata on my MacBook and got no such message. The Program then ran as it should and passed the argument successfully.

      Comment


      • #4
        Good luck with your iMac. I'm afraid I have nothing to offer you in the way of help with that. There are a number of people on the forum who are Mac experts, and perhaps one of them will chime in here.

        Comment


        • #5
          dear all,
          I use STATA 15 on my Mac, a recent message similar to the one you've discussed about for a while put me in difficulty...
          can you help with " icudt54l.dat "
          Thank you for your help,
          best,
          PH

          Comment

          Working...
          X