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

Bonsai Function

Expand Messages
  • melchior prisi
    Hi all, The following function returns the content of the last variable in an array: H= _LastVar ^!result ^%^&^%^&0%% H= Test_LastVar ^!setlistdelimiter
    Message 1 of 4 , Sep 12, 2005
    • 0 Attachment
      Hi all,

      The following function returns the content
      of the last variable in an array:

      H="_LastVar"
      ^!result ^%^&^%^&0%%


      H="Test_LastVar"
      ^!setlistdelimiter
      ^!setarray %chain%=one;two;three;four;five
      ^!info ^$lastvar(chain)$


      Regards,
      Melchior
      --
    • abairheart
      ... Well, since you must KNOW the name of the array to pass it to the function, why not just get it without a functio call? ^!Info ^%arrayname^%arrayname0%%
      Message 2 of 4 , Sep 13, 2005
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, melchior prisi <mprisi@s...> wrote:
        > Hi all,
        >
        > The following function returns the content
        > of the last variable in an array:
        >
        > H="_LastVar"
        > ^!result ^%^&^%^&0%%
        >
        >
        > H="Test_LastVar"
        > ^!setlistdelimiter
        > ^!setarray %chain%=one;two;three;four;five
        > ^!info ^$lastvar(chain)$
        >

        Well, since you must KNOW the name of the array to pass it
        to the function, why not just get it without a functio call?

        ^!Info ^%arrayname^%arrayname0%%

        Abair
      • melchior prisi
        Hi Abair ... That s right - but ^%^&^%^&0%% looks better... Regards, Melchior --
        Message 3 of 4 , Sep 13, 2005
        • 0 Attachment
          Hi Abair

          ----- on 13.09.2005 18:21 abairheart wrote:
          > Well, since you must KNOW the name of the array to pass it
          > to the function, why not just get it without a functio call?
          >
          > ^!Info ^%arrayname^%arrayname0%%

          That's right - but ^%^&^%^&0%%
          looks better...

          Regards,
          Melchior
          --
        • i72301
          Melchior Actually, I think ^$lastvar(chain)$ looks better it hides the rather cryptic ^%^&^%^&0%% and the somewhat less cryptic
          Message 4 of 4 , Sep 13, 2005
          • 0 Attachment
            Melchior

            Actually, I think "^$lastvar(chain)$" looks better it hides the rather cryptic "^%^&^%^&0%%" and the somewhat less cryptic "^%arrayname^%arrayname0%%".

            With a little tweaking, it could make clip array variables a lot easier to use. Well done.

            Ian

            On Tue, 13 Sep 2005 20:23:10 +0200, melchior prisi wrote:
            > Hi Abair
            >
            > ----- on 13.09.2005 18:21 abairheart wrote:
            >
            >> Well, since you must KNOW the name of the array to pass it to the
            >> function, why not just get it without a functio call?
            >>
            >> ^!Info ^%arrayname^%arrayname0%%
            >>
            > That's right - but ^%^&^%^&0%%
            > looks better...
            >
            > Regards,
            > Melchior
          Your message has been successfully submitted and would be delivered to recipients shortly.