Plain text library stacks
Peter W A Wood
peterwawood at gmail.com
Thu Apr 23 09:34:50 EDT 2015
Here is a very simple server script and a very simple “text” library script that show just what I was hoping.
The Library Script:
script "TextLib"
function TL.compare pFirst, pSecond
return pFirst = pSecond
end TL.compare
The Server Script:
#!<path to livecode>
#coding:utf-8
set the outputLineEndings to "lf”
set the outputTextEncoding to “utf8"
put the Version & return
start using stack “<path to >/TextLib.livecode”
dispatch function "TL.compare" to stack "TextLib" with "a", "b”
put the result & return
dispatch function "TL.compare" to stack "TextLib" with "LiveCode", “LiveCode"
put the result & return
I created both scripts in a text editor (using UTF-8 encoding) rather than the IDE.
I think it’s great that LiveCode has given us this alternative way of working with script only stacks.
Peter
> On 23 Apr 2015, at 20:47, David Bovill <david at viral.academy> wrote:
>
> Great. I can now refactor all those libraries.
More information about the use-livecode
mailing list