Re: return value
Thomas Michael Hagen <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
this is what the call looks like (abbreviated for clarity):
:read-pieces: (:name:) #splits the file into '#http://'-initiated
chunks/pieces/articles:
{
{
input (:file:) [:*:name:]
trap /unable to read-open the file/
output /Couldn't read file! Trying next file\n/
return
trap /program has overflowed/ #the file is too big for the machine's memory
output /File too big! Trying next file\n/
return
}
# the first piece/article:
match (:: :url: :not-used: :chunk: :next:) [:file:]
/(#http:.*?(CET|CEST) ....)(.*?)(#htt|$)/
isolate (:interaction:) /:*:url::*:chunk:/
call /:interact:/ [:*:interaction:] #asking the user for the right category
output /:*:url:\n<Topic: :*:user-feedback:>:*:chunk:<\/Topic>\n\n/
[:*:name:]
{ #the next pieces/articles:
match <fromnext> (:: :url: :not-used: :chunk: :next:) [:file:]
/(#http:.*?(CET|CEST) ....)(.*?)(#htt|$)/
isolate (:interaction:) /:*:url::*:chunk:/
call /:interact:/ [:*:interaction:] #asking the user for the right category
output <append> /:*:url:\n<Topic:
:*:user-feedback:>:*:chunk:<\/Topic>\n\n/ [:*:name:]
liaf
}
return
}
:interact: (:args:)
{
isolate (:user-feedback:)
input <byline> [stdin] (:user-feedback:)
return /:*:user-feedback:/
}
as mentioned, the :user-feedback: variable does not get returned to
the caller; :read-pieces:.
On Sun, Mar 22, 2009 at 10:49 PM, Chris Babcock
<[email protected]> wrote:
> On Sun, 22 Mar 2009 21:33:26 +0100
> Thomas Michael Hagen <[email protected]> wrote:
>
>> in vanilla crm, i can specify a return value by saying
>>
>> return /var-expanded return-regex/
>>
>> but this does not seem to be possible in gerh-builds.
>>
>>
>> this is my code:
>>
>> isolate (:user-feedback:)
>> input <byline> [stdin] (:user-feedback:)
>> return /:*:user-feedback:/
>
> I'm using 20080630-BlameVT-Ger and this worked:
>
> [usak@cl-t090-563cl bin]$ ./input.crm
> I'm being eaten by a boa constrictor.
> I'm being eaten by a boa constrictor.
> [usak@cl-t090-563cl bin]$ cat ./input.crm
> #!/usr/local/bin/crm
> # input.crm - Input test
> window
> call /:blocker:/
> output /:*:user-feedback:/
> exit
>
> :blocker:
> isolate (:user-feedback:) //
> input <byline> [stdin] (:user-feedback:)
> return /:*:user-feedback:/
>
> Are you using BlameBarack? What does the call look like?
>
> BTW, thanks for this question. I've been trying to get <byline>
> behavior out of syscall and now I know how to do it.
>
> Chris
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Crm114-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crm114-general
>
>
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com