Hallo, sokratesla hat gesagt: // sokratesla wrote:
# Hi all, # is there a way of knowing the number of creation arguments of an abstraction in the scope of the abstraction while loading it. # I want to load the parameters of an abstraction from a file. But if no arguments are given, default parameters will be loaded.
ex: [abst] [abst param1.dat]
# I made something like this:
[loadbang] | [symbol $1] | [read $1( | [qlist]
etc.
# But, of course, this gives an error when there are no creation arguments.
As missing arguments are initialized to 0 you can use a [select 0] to filter out unwanted arguments. Instead of [symbol $1] I would maybe use [list $1], which can deal with both symbols and floats. Then just connect the [list] to the [select] and use the right outlet of [select] to go to the [read $1( message. You can also connect a message with a default value to the left outlet of [select], which will be banged if you didn't supply an argument.
Frank Barknecht _ ______footils.org_ __goto10.org__