Haven't had any luck trying to do
filter vFour with vOne
Is it possible?
The error messages aren't any help.
First try with "Filter"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
First try with "Filter"
Life is just a bowl of cherries.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Well it's hard to judge the cause if all we have is a one-liner...
Is the Script Editor throwing an error during compilation? Is the result less than satisfactory?
What exactly are vFour and vOne?
Local variables? Global variables?
And what is in them?
The filter command allows you to 'filter' the lines of a 'container' on the basis of a filter pattern, which is a very limited version of regular expression syntax.
So what exactly is confusing or not working?
I'm sure we can help figure it out.
Jan Schenkel.
Is the Script Editor throwing an error during compilation? Is the result less than satisfactory?
What exactly are vFour and vOne?
Local variables? Global variables?
And what is in them?
The filter command allows you to 'filter' the lines of a 'container' on the basis of a filter pattern, which is a very limited version of regular expression syntax.
So what exactly is confusing or not working?
I'm sure we can help figure it out.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
First try with "Filter"
The question was general.
Can a variable be filtered by another variable?
Assume that the contents of the variable are
suitable e.g.
vFour = 123
vOne = 1
Can a variable be filtered by another variable?
Assume that the contents of the variable are
suitable e.g.
vFour = 123
vOne = 1
Life is just a bowl of cherries.
That will work, but result in an empty var. Filter does look at each line, and if the line doesn't match the simplified regular expression you gave it, it will remove that line from the var. If you give it "1", it'll expect exactly that as a line, so "123" will not qualify.
A better example might be:
vFour = 1 & return & 2 & return & 3
vOne = 1
filter vFour with vOne = 1
filter vFour without vOne = 2 & return & 3
A better example might be:
vFour = 1 & return & 2 & return & 3
vOne = 1
filter vFour with vOne = 1
filter vFour without vOne = 2 & return & 3
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
First try with "Filter"
Thanks BvG.
There's a stack in my User Space
called "Filter" which shows how to
use the filter function.
There's a stack in my User Space
called "Filter" which shows how to
use the filter function.
Life is just a bowl of cherries.