Hi All,
I was curious and trying to find a solution.
I was wondering how you know the default values of a Record or Custom Type such as TMidi?
Also is there a way to clear a Record. I know you could probably create a function to do this, however I am not sure if there is a way to read how many parameters, nor access the parameters generically to do this in a custom function.
-s
Scripting: Clearing a Record or Custom Type
Well I might have found a solution:
midi_temp := Default(TMidi);
anyone have any better solutions, or know of any deficiencies with using this Default?
-s
midi_temp := Default(TMidi);
anyone have any better solutions, or know of any deficiencies with using this Default?
-s
"Every act of creation is first an act of destruction." -Picasso
As far as I know, custom types don't work. Sephult, did you get them to work?
Regards,
Scott
Scott
Hi ahonoe,
Yes Creating your own types/records does work i will try to take some time in near future to update scripting wiki. So when you create a record you have to then create a variable attached to that record name. Like below the record name is (state) so you have to do something like (var loop:state;) then when you access the sub-records you say (loop.start:=45);
type state = record
start:single;
pos:integer;
last:integer;
max:integer;
end;
var loop:state;
----------------------------------------------------------
loop.start:=45;
Yes Creating your own types/records does work i will try to take some time in near future to update scripting wiki. So when you create a record you have to then create a variable attached to that record name. Like below the record name is (state) so you have to do something like (var loop:state;) then when you access the sub-records you say (loop.start:=45);
type state = record
start:single;
pos:integer;
last:integer;
max:integer;
end;
var loop:state;
----------------------------------------------------------
loop.start:=45;
"Every act of creation is first an act of destruction." -Picasso
Who is online
Users browsing this forum: Bing [Bot] and 24 guests
