Custom functions in TreeSheets programs

116 views
Skip to first unread message

Andrés C. González

unread,
May 4, 2020, 10:00:24 AM5/4/20
to TreeSheets
Hello,

I think it could be interesting to have custom functions in programs, defined in a lobster script.

For example, if there is a file called "functions.lobster" in the scripts folder, functions defined in it could be used in programs.

What do you think?

Wouter van Oortmerssen

unread,
May 4, 2020, 12:30:40 PM5/4/20
to trees...@googlegroups.com
You should already be able to do that, just create a folder in `scripts` called `modules`, stick a re-usable file in there (e.g. `foo.lobster`), then import it in your main script using an `import foo` statement.

--
You received this message because you are subscribed to the Google Groups "TreeSheets" group.
To unsubscribe from this group and stop receiving emails from it, send an email to treesheets+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/treesheets/44925761-6ae7-42cb-b002-46735db85df3%40googlegroups.com.

Andrés C. González

unread,
May 4, 2020, 12:42:39 PM5/4/20
to trees...@googlegroups.com
Thanks for the reply.

I think I didn't explain my idea clearly. I was thinking about using those functions in the "sheet programs", I mean those that are run using menu "Program > run".



--

Wouter van Oortmerssen

unread,
May 4, 2020, 12:49:57 PM5/4/20
to trees...@googlegroups.com
Ahh ok.. yeah sadly the "sheet programming language" is a bit underdeveloped, it would need more work than just external functions to make it practical.

Reply all
Reply to author
Forward
0 new messages