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

14216Re: [Clip] How do I get array data back

Expand Messages
  • Ian D. Davies
    Sep 11, 2005
    • 0 Attachment
      I notice that you are not running through loop2. You only process the first
      item in loop2 then fall through to ":bestaat". You need a goto at the bottom
      of the loop sending you backup to loop2.

      ----- Original Message -----
      From: "Bauke P. de Vries" <bpdevries@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Sunday, September 11, 2005 9:45 AM
      Subject: Re: [Clip] How do I get array data back


      > Hello,
      >
      > I'm trying to write a clip to append a row from one file to another
      > file. The "to"-file's name is based on the first field of the row in the
      > "from"-file. The "from"-file has about 250 rows and for every row there
      > should be a "to"-file. Must be checked.
      >
      > The problem is that I don't get any filenames from the filename-array in
      > the second loop (loop2). I've tried it with another counter (%n%) but
      > that doesn't work either.
      >
      > Must be a beginnes question (I am beginner). Couldn't find it in the
      > doc's.
      >
      > Thanks in advance for helping me!
      >
      > Clip below
      >
      > ^!SetDebug 1
      >
      > ^!Jump Text_Start
      > ^!SetWordWrap OFF
      > ^!SetDelimiter ,
      > ^!SetArray %Filenamen%=""
      > ^!SetArray %Regels%=""
      > ^!Set %rnr%=0
      >
      > :loop1
      > ^!Inc %rnr%
      > ^!Set %SGTicker%=^$GetField(^%rnr%;1)$
      > ^!If ^$StrCopyRight(^%SGTicker%;2)$ <> AS ^!Goto loop1
      > ^!SetArray %Filenamen^%rnr%%=^%SGTicker%.sg.txt
      > ^!SetArray %Regels^%rnr%%=^$GetLine(^%rnr%)$
      > ^!If ^$GetRow$ = ^$Calc(^$GetLineCount$-1)$ Skip
      > ^!Goto loop1
      >
      > ^!Set %rnr%=0
      >
      > :loop2
      > ^!Inc %rnr%
      > ^!IfFileExist ^%Filenamen^%rnr%% ^!Goto bestaat ELSE ^!Goto bestaatniet
      >
      >
      > :bestaat
      > ^!Info bestaat !!!!!!!!!!!!!!!
      > ^!Goto end
      >
      > :bestaatniet
      > ^!Info bestaat niet !!!!!!!!!!!!!!!
      > ^!Goto end
      >
      >
      > :end
      > ^!Info rnr = ^%rnr%
      > ^!Info filenaam = ^%Filenamen^%rnr%%
      > ^!Info regel = ^%NL%^%Regels^%rnr%%
      >
      > Met vriendelijke groet,
      >
      > *Bauke P. de Vries
      > *
      >
      >
      >
      >
      >
      > Fookes Software: http://www.fookes.us, http://www.fookes.com
      > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
    • Show all 19 messages in this topic