Loading ...
Sorry, an error occurred while loading the content.

20819Re: [NRN] GetShort isn't getting it

Expand Messages
  • Axel Berger
    Jul 1, 2010
    • 0 Attachment
      ebbtidalflats wrote:
      > So what am I doing wrong in the clip below? Platform Windows XP Pro SP3:

      Wrong list, so I'll answer here.

      > H="TestShort
      > ;why do some of these work, others don't?
      > ;
      > ;works:
      > ^!Set %docname%=^$GetName(^$GetShort(^##)$)$
      > ^!Info [L]"^%docname%"
      > ;
      > ;does NOT work:
      > ^!Set %docname%=^$GetShort(^$GetName(^##)$)$
      > ^!Info [L]"^%docname%"
      > ;
      > ;works:
      > ^!Set %docname%=^$GetShort(^##)$
      > ^!Set %docname%=^$GetName(^%docname%)$
      > ^!Info [L]"^%docname%"
      > ;
      > ;does NOT work:
      > ^!Set %docname%=^$GetName(^##)$
      > ^!Set %docname%=^$GetShort(^%docname%)$
      > ^!Info [L]"^%docname%"

      Reduce that to:

      > H="TestShort
      > ^!Set %docname%=^$GetShort(^##)$
      > ^!Info [L]"^%docname%"
      > ;
      > ^!Set %docname%=^$GetName(^##)$
      > ^!Info [L]"^%docname%"

      See? GetShort returns a full path. GetName can access that and retrieve
      the name. GetName returns a naked name alone. GetShort won't know where
      to find a file with that name and can't work.

      Axel
    • Show all 2 messages in this topic