ArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2008-12-05T00:31:44+02:00 https://brainmodular.org/forums/app.php/feed/topic/1194 2008-12-05T00:31:44+02:00 2008-12-05T00:31:44+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6487#p6487 <![CDATA[scripts--converting to and from booleans]]>
I tried some varieties of using typecasting to get integers from booleans without success. I wouldn't be at all surprised if there is a way that I don't know of. Olivier?

Statistics: Posted by bsork — 04 Dec 2008, 23:31


]]>
2008-12-04T19:50:30+02:00 2008-12-04T19:50:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6478#p6478 <![CDATA[scripts--converting to and from booleans]]>
Just didn't want to have to put this in every script where I need to do the conversion....

Statistics: Posted by woodslanding — 04 Dec 2008, 18:50


]]>
2008-12-04T09:48:23+02:00 2008-12-04T09:48:23+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6465#p6465 <![CDATA[scripts--converting to and from booleans]]>

CODE:

function boolToInt&#40;b &#58; boolean&#41; &#58; integer;begin    if &#40;b&#41; then begin      result &#58;= 1;    end    else begin      result &#58;= 0;    end;end;
(...and once again I have to add begin...end in an if-else-statement where it shouldn't be needed...)

Statistics: Posted by bsork — 04 Dec 2008, 08:48


]]>
2008-12-04T01:12:04+02:00 2008-12-04T01:12:04+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6462#p6462 <![CDATA[scripts--converting to and from booleans]]>
guess I'd still like to know how this is done, tho.

Statistics: Posted by woodslanding — 04 Dec 2008, 00:12


]]>
2008-12-04T00:54:14+02:00 2008-12-04T00:54:14+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6458#p6458 <![CDATA[scripts--converting to and from booleans]]>
my kingdom for a manual ;)

Statistics: Posted by woodslanding — 03 Dec 2008, 23:54


]]>
2008-12-03T21:08:53+02:00 2008-12-03T21:08:53+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6450#p6450 <![CDATA[scripts--converting to and from booleans]]> Statistics: Posted by woodslanding — 03 Dec 2008, 20:08


]]>
2008-12-03T20:46:49+02:00 2008-12-03T20:46:49+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6449#p6449 <![CDATA[scripts--converting to and from booleans]]>
Nothing much out there on the web.

Thanks!

Statistics: Posted by woodslanding — 03 Dec 2008, 19:46


]]>
BrainModular BrainModular Users Forum 2008-12-05T00:31:44+02:00 https://brainmodular.org/forums/app.php/feed/topic/1194 2008-12-05T00:31:44+02:00 2008-12-05T00:31:44+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6487#p6487 <![CDATA[scripts--converting to and from booleans]]>
I tried some varieties of using typecasting to get integers from booleans without success. I wouldn't be at all surprised if there is a way that I don't know of. Olivier?

Statistics: Posted by bsork — 04 Dec 2008, 23:31


]]>
2008-12-04T19:50:30+02:00 2008-12-04T19:50:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6478#p6478 <![CDATA[scripts--converting to and from booleans]]>
Just didn't want to have to put this in every script where I need to do the conversion....

Statistics: Posted by woodslanding — 04 Dec 2008, 18:50


]]>
2008-12-04T09:48:23+02:00 2008-12-04T09:48:23+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6465#p6465 <![CDATA[scripts--converting to and from booleans]]>

CODE:

function boolToInt&#40;b &#58; boolean&#41; &#58; integer;begin    if &#40;b&#41; then begin      result &#58;= 1;    end    else begin      result &#58;= 0;    end;end;
(...and once again I have to add begin...end in an if-else-statement where it shouldn't be needed...)

Statistics: Posted by bsork — 04 Dec 2008, 08:48


]]>
2008-12-04T01:12:04+02:00 2008-12-04T01:12:04+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6462#p6462 <![CDATA[scripts--converting to and from booleans]]>
guess I'd still like to know how this is done, tho.

Statistics: Posted by woodslanding — 04 Dec 2008, 00:12


]]>
2008-12-04T00:54:14+02:00 2008-12-04T00:54:14+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6458#p6458 <![CDATA[scripts--converting to and from booleans]]>
my kingdom for a manual ;)

Statistics: Posted by woodslanding — 03 Dec 2008, 23:54


]]>
2008-12-03T21:08:53+02:00 2008-12-03T21:08:53+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6450#p6450 <![CDATA[scripts--converting to and from booleans]]> Statistics: Posted by woodslanding — 03 Dec 2008, 20:08


]]>
2008-12-03T20:46:49+02:00 2008-12-03T20:46:49+02:00 https://brainmodular.org/forums/viewtopic.php?t=1194&p=6449#p6449 <![CDATA[scripts--converting to and from booleans]]>
Nothing much out there on the web.

Thanks!

Statistics: Posted by woodslanding — 03 Dec 2008, 19:46


]]>