ArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2021-02-15T13:29:36+02:00 https://brainmodular.com/forums/app.php/feed/topic/6796 2021-02-15T13:29:36+02:00 2021-02-15T13:29:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43204#p43204 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]> Statistics: Posted by senso — 15 Feb 2021, 12:29


]]>
2021-02-15T12:57:36+02:00 2021-02-15T12:57:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43203#p43203 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]>
Thank you very much. Now I think I understand how a simple script works. It works perfectly well.

Here is the final patch for people who need it.

creal
decode date working.pat

Statistics: Posted by creal — 15 Feb 2021, 11:57


]]>
2021-02-15T10:53:25+02:00 2021-02-15T10:53:25+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43202#p43202 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]> No chance to compile.
A script should have an 'INIT' and a 'PROCESS' procedure

Here is the correct script, I hop it will help.

CODE:

//////////////////////////// Decode date /////////////////////////// declaration   var year,month,day : Tparameter;   // decode                                   procedure Init;   begin                     year:=CreateParam('year',ptDataField,pioOutput); year.MinMaxNoLimit(true); month:=CreateParam('month',ptDataField,pioOutput);                     month.MinMaxNoLimit(true); day:=CreateParam('day',ptDataField,pioOutput); day.MinMaxNoLimit(true);               end;          //PROCESS                            PROCEDURE PROCESS();var y,m,d : uInt16;BEGIN     DecodeDate(Date,y,m,d);   year.asinteger(y);  month.asinteger(m);  day.asinteger(d);  END;    

Statistics: Posted by senso — 15 Feb 2021, 09:53


]]>
2021-02-14T11:10:14+02:00 2021-02-14T11:10:14+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43201#p43201 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]>
I tried to make a script but I'm really a noob even if years ago I learnt several languages on a basic level. Unfortunately, I just don't have the time to dive into.

I attached the script as well as a screenshot of date and time functions, taken from the official script references of Usine, available here: https://www.brainmodular.com/manuals/hh4/en/scripting

If someone has the time to tell me what's wrong with my code, I would be grateful.

Thanks,

creal.
date and time functions.png

decode date.pat

Statistics: Posted by creal — 14 Feb 2021, 10:10


]]>
2021-02-11T10:29:28+02:00 2021-02-11T10:29:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43194#p43194 <![CDATA[Script that outlets the date of the current day (year, month, day)]]>
I saw some scripting functions (here: https://www.brainmodular.com/manuals/hh4/en/scripting ) about the current date and I'm wondering if anyone already has scripted a patch with 3 outlets (year, month, day), be it strings or integers, please?

creal.

Statistics: Posted by creal — 11 Feb 2021, 09:29


]]>
BrainModular BrainModular Users Forum 2021-02-15T13:29:36+02:00 https://brainmodular.com/forums/app.php/feed/topic/6796 2021-02-15T13:29:36+02:00 2021-02-15T13:29:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43204#p43204 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]> Statistics: Posted by senso — 15 Feb 2021, 12:29


]]>
2021-02-15T12:57:36+02:00 2021-02-15T12:57:36+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43203#p43203 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]>
Thank you very much. Now I think I understand how a simple script works. It works perfectly well.

Here is the final patch for people who need it.

creal
decode date working.pat

Statistics: Posted by creal — 15 Feb 2021, 11:57


]]>
2021-02-15T10:53:25+02:00 2021-02-15T10:53:25+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43202#p43202 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]> No chance to compile.
A script should have an 'INIT' and a 'PROCESS' procedure

Here is the correct script, I hop it will help.

CODE:

//////////////////////////// Decode date /////////////////////////// declaration   var year,month,day : Tparameter;   // decode                                   procedure Init;   begin                     year:=CreateParam('year',ptDataField,pioOutput); year.MinMaxNoLimit(true); month:=CreateParam('month',ptDataField,pioOutput);                     month.MinMaxNoLimit(true); day:=CreateParam('day',ptDataField,pioOutput); day.MinMaxNoLimit(true);               end;          //PROCESS                            PROCEDURE PROCESS();var y,m,d : uInt16;BEGIN     DecodeDate(Date,y,m,d);   year.asinteger(y);  month.asinteger(m);  day.asinteger(d);  END;    

Statistics: Posted by senso — 15 Feb 2021, 09:53


]]>
2021-02-14T11:10:14+02:00 2021-02-14T11:10:14+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43201#p43201 <![CDATA[Re: Script that outlets the date of the current day (year, month, day)]]>
I tried to make a script but I'm really a noob even if years ago I learnt several languages on a basic level. Unfortunately, I just don't have the time to dive into.

I attached the script as well as a screenshot of date and time functions, taken from the official script references of Usine, available here: https://www.brainmodular.com/manuals/hh4/en/scripting

If someone has the time to tell me what's wrong with my code, I would be grateful.

Thanks,

creal.
date and time functions.png

decode date.pat

Statistics: Posted by creal — 14 Feb 2021, 10:10


]]>
2021-02-11T10:29:28+02:00 2021-02-11T10:29:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=6796&p=43194#p43194 <![CDATA[Script that outlets the date of the current day (year, month, day)]]>
I saw some scripting functions (here: https://www.brainmodular.com/manuals/hh4/en/scripting ) about the current date and I'm wondering if anyone already has scripted a patch with 3 outlets (year, month, day), be it strings or integers, please?

creal.

Statistics: Posted by creal — 11 Feb 2021, 09:29


]]>