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

Re: [Clip] Subject: New directory...

Expand Messages
  • Alan
    Hi Bill, ... four ... line Well, *mostly I had meant the operation of cursor getting from one line to the next. Say, the cursor get from line one to line two,
    Message 1 of 13 , Oct 30, 2000
    • 0 Attachment
      Hi Bill,

      > I am not sure what you mean by "bump it up to the next line". It takes
      > keyboard Ctrl+Rightarrow key to move cursor down to beginning of second

      Well, *mostly I had meant the operation of cursor getting from one line to
      the next. Say, the cursor get from line one to line two, for example.
      However, I apologize for not being specific enough since I also used the
      general term "bump it up" sometimes to mean to get cursor moved from one
      word to the next word.

      Now I see more specifics of what the clip is doing. Gopal explained it all
      very nicely. What I know now that I was unsure of then is that just exactly
      what you said above-> you are using first word on the line as subdir name
      then 2nd word for filename. And I was unsure how many Ctrl+Right it took
      before cursor then went to the next line below. Now I know more.

      > >Next, enter :loop
      > :loop
      > ; True, therefore jump to label :nextline
      > ^!If ^$GetRow$ > ^%nowrow% nextline

      The > ; True, therefore jump to label :nextline is yours, not what I
      wrote. On the VERY first beginning start of the clip, that is wrong. In
      such case, it does NOT jump to label :nextline. Why? ->Look at

      ^!Jump Doc_Start
      ^!Set %nowrow%=^$GetRow$

      which, in the clip, is not very many lines back up above. Notice the = in
      that ^!Set line which has made the ^$GetRow$ function equal to the variable
      named %nowrow%

      ^!If ^$GetRow$ > ^%nowrow% nextline

      The > (in the middle) means greater than. That means a prerequisite
      exists which must be met before it will jump to :nextline. And the
      prerequisite is that the ^$GetRow$ function MUST be greater than the
      ^%nowrow% variable (equal to does not qualify).

      > ; ^!IfFalse Value GoToLabelTrue, If Value is an empty string or equal to
      > then jumps to specified label name. ^$IsEmpty(Value)$ Returns 1 if the
      > value/variable is empty and 0 if it contains data. Variable contains data,
      > therefore returns 0 so jumps to label name "Skip_2"
      > ^!IfFalse ^$IsEmpty(^$GetWord$)$ Skip_2

      Yes, at very begin of clip run, it follows skip 2 as you just said. BTW it
      easier for me to (only in my mind) to revert as follows. Instead of trying
      to figure out IfFalse and IsEmpty, what I do is say to myself (its double
      opposite): IfTrue IsFull (the get word function), these conditions met makes
      it utilize the skip 2 route. Nonetheless, you are right so far.

      > ^!Keyboard Ctrl+Right
      > ^!GoTo loop
      > ; We skipped 2 lines to get here, the cursor remains on line 1 of the
      > text file, at begining of "644", and following script will move that file
      > from source directory to new subdirectory. Basically my confusion is the
      > preceding line in loop 1, if the result is True, and it appears to be,
      > you are sent to the label :nextline and the following script needs to be
      > executed first.

      You are wrong (about the True). At begin of clip run, (see my equals versus
      greater than comments above) the condition needed to jump to :nextline is
      not met

      If we were to think of it in terms that it needed to be true in order to
      jump to :nextline then the getrow function MUST be greater than the
      ^%nowrow% variable (this would be a True). However, I instead prefer to
      think of the ^!If ^$GetRow$ > ^%nowrow% nextline line of code as a
      conditional statement ie if the condition is met then it jumps to :nextline.
      Conversely, if the condition is not met then it merely goes on to the next
      line of code instead of jumping to :nextline.

      ^!If ^$GetRow$ > ^%nowrow% nextline
      Once again, the line or row number returned by the getrow function must be
      greater than the content (line number) of the ^%nowrow% variable is the
      condition which makes it jump to :nextline. If this particular condition is
      not met, then it merely parses or goes/procedes on down to the next line of

      > ;Same as script above following line ^!Jump Doc_Start, it will create the
      > next subdirectory which in this example is "nextitem". Hence my confusion
      > now starts as at this point the cursor has not moved from the first

      You are wrong about the cursor. The cursor has moved from the first line.
      The cursor is now on the second line. Why? ->
      Be mindful of

      firstitem 644 645

      1. In :loop It has already followed the skip 2 route and moved the file (the
      644 file). 2. Next line of code after the file move is Ctrl+Right which
      moves cursor to end of 644 thus 644| 3. Now, goto loop makes it jump to
      beginning of :loop 4. This time it follows NEITHER the :nextline route NOR
      the skip 2 route 5. It now gets another Ctrl+Right which moves the cursor
      thus |645 6. It now gets a goto (jump) to beginning of :loop again (only
      used the first half of loop this time, did not get down into move file
      portion) 7. Since it can now get the 645 word (the get word function is not
      empty) it follows the skip 2 route again, moves the 645 file 8. After file
      move, it gets another Ctrl+Right (*here it is, you yourself said it takes 4
      of Ctrl+Right which makes the cursor now be no longer on line 1 but be on
      line 2 instead) 9. Another goto (jump) to beginning of :loop 10. The
      condition is now met to jump to :nextline because the cursor indeed has
      jumped to the next line as detected by the getrow function, the get row
      function is now *temporarily greater than the %nowrow% variable.

      * Incorporated within :nextline is ^!Set %nowrow%=^$GetRow$ which once
      again makes the %norow% variable "equal to" (not less than) the ^$GetRow

      The clip temporarily opens gateways (routes or whatever u want to call it)
      then closes them. Clever.

      > Alan, please see my specific comments above, it appears to me that we go
      > directly to :nextline label before moving the files on line 1, this is not
      > happening when the clip is executed, as it is continuing through the loop
      > couple of times to move the files. Obviously I do not understand the first
      > line of :loop. When I do, the rest of your analysis will be clear I am

      Well, I got the opportunity to practice and further my clip learning and
      clip skills. Thanks. I see you just replied to Gopal. Looks like you
      already got it. I'll still send this one and share it. By me going over it
      and putting it into my own words helps me learn and understand it better

      HTH Regards. Alan.
    Your message has been successfully submitted and would be delivered to recipients shortly.