Page 1 of 1

Type of variables

Posted: Sat Mar 20, 2010 7:11 pm
by ncc1502
Why are there only variables of the type byte, integer, string and float?

Unsigned integer and longint would be verry welcome. I can't imagine that the c-compiler the code is transformed to does not have these type of variables.

Re: Type of variables

Posted: Thu Apr 08, 2010 11:57 pm
by ncc1502
ncc1502 wrote:Why are there only variables of the type byte, integer, string and float?

Unsigned integer and longint would be verry welcome. I can't imagine that the c-compiler the code is transformed to does not have these type of variables.
MM guys, any coment on this message would be appreciated.

Re: Type of variables

Posted: Fri Apr 09, 2010 7:10 am
by Steve
I agree that these would be a good addition to Flowcode. However, I want to be careful to keep Flowcode simple to use and I do not want to "flood" it with an excessive amount of data types.

We will seriously consider the expansion of data types. My current favourites to add are a 32-bit signed LONGINT and a 1-bit BOOL.

If anyone has any opinions on future datatypes for Flowcode, then I welcome any comments or suggestions...

Re: Type of variables

Posted: Fri Apr 09, 2010 9:09 pm
by ncc1502
Thanks for your reply Steve.

What i am concernd longint is needed, unsigned integer is sometimes handy, but not nececary (if needed a longint will do the job).

A bool would be nice, will it cut memory usage or is it the same as byte?

With bool type variable, will things like: if name then..... be possible?

Re: Type of variables

Posted: Mon Apr 12, 2010 10:55 am
by Steve
A bool will probably take a single bit. And you can do "if <name> then..." now with a byte variable if you like (this treats a value of zero as "false" and anything else as "true").

Re: Type of variables

Posted: Tue Feb 08, 2011 8:41 pm
by Niro
Dear Steve,
I'd really appreciate an unsigned INT.
If you're working with 16 bit registers on the AVR this type is absolutely essential, if you don't want to waste memory or calculate with HbLB long-winded...

Re: Type of variables

Posted: Wed Oct 12, 2011 5:35 pm
by allpicproject
Hi Steve n all friends,

For Unsigned Integer, for me is very very very useful in:

1. Do loop in very specific time ( especially in control multiple servo ,, i have difficulty setting a few servo in last project ) this due that I also use ADC at same time.
2. If use interrupt , I'm afraid the interrupt timer will affect the ADC value if the ADC in processing when interrupt occur.
3. If using long int, that will be over kill and a waste of memory space if using low end PIC with low memory.
4. I just use C code for that reason ( for set a few servo ).
5. Normally I use ' while/loop until ' if there is some sensitive process ie. ADC etc, to set time and this the main purpose for UNSIGNED INT is really required.

So, if not so much problem, hopefully we can have the UNSIGNED INT in update v4.x

Rgds
Zuki.

Re: Type of variables

Posted: Thu Oct 13, 2011 8:28 am
by Steve
allpicproject wrote:So, if not so much problem, hopefully we can have the UNSIGNED INT in update v4.x
Unfortunately, this would be a fairly big change, so only V5 will have this (and other) new data types.

Re: Type of variables

Posted: Thu Oct 13, 2011 10:14 am
by allpicproject
Steve wrote:
allpicproject wrote:So, if not so much problem, hopefully we can have the UNSIGNED INT in update v4.x
Unfortunately, this would be a fairly big change, so only V5 will have this (and other) new data types.
Thanks for feedback :D