Lasso Soft Inc. > Home

[ capture->invokeAutoCollect ]

Method

Invokes the capture but puts all autocollect data in a new string buffer returns that buffer. Non-autocollecting captures are just invoked with no resulting value.

  • Syntax
capture->invokeAutoCollect()
Examples
  • Intermediate

Define a method which takes a givenBlock, invokes it with invokeAutoCollect and writes it to the log.

Code

define log(s) => { 
	local(f) = file
	handle => {#f->close}
	#f->openAppend(#s->asString)
	#f->writeString(givenBlock->invokeAutoCollect+sys_eol)
}

log('myfile.txt')
'The log message'
/log

Result

The string 'The log message' appended to the file 'myfile.txt'.

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft