Console container for put function?

Mark Wieder mwieder at ahsoftware.net
Sat Apr 25 00:53:56 EDT 2015


On 04/23/2015 11:09 PM, Peter W A Wood wrote:

> I’m trying to find a better way than:
>
> 	if the environment is “server” then
> 		put tResult
> 	else
> 		put tResult after Field tReport
> 	end

That's exactly how I deal with it, with the exception that I wrap it in 
a log function. That way there's only one place in the stack that needs 
to check the environment, and I can also put other conditions in the log 
file as needed

command log pMessage
   if there_are_things_to_add_to_the_message ...
   end if
   if verboseMode ...
     if the environment is ...
       put ...
     else
       put ...
     end if
   end if
end log

log "I made it to function" && param(0)
log "at this point the value of foo is" && foo

-- 
  Mark Wieder
  ahsoftware at gmail.com






More information about the use-livecode mailing list