Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?

Typed variables: enumerations?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-25-2009, 08:45 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default Typed variables: enumerations?

Hi all; back in May 2008 Erel said in response to a discussion about variants (held in string form) versus typed (integer) variables:

"The next major update will allow declaring regular variables in a specific type (local and global)."

But I don't see any mention of typing against the 6.80 Beta enhancements.

On the other hand I imagine that a new method of variable handling might be quite an extensive change...

When thinking about my use of a variable (in my mind an integer) to hold one of three values (-1; 0; +1) I wondered if it would be just as efficient at run time to use three string values which could be more descriptive of the three meanings. Which is to say, really, what I should be using is an enumeration.

A similar concept is the state variable which has named bits within a bit pattern. This is just an efficient boolean array that can be manipulated neatly because it is stored in a compact contiguous portion of memory.

Any chance of importing any of these foreign concepts?

Cheers, Mike.
Reply With Quote
  #2 (permalink)  
Old 04-25-2009, 09:06 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

This feature is not included in V6.80. It will be implemented in a future version.
Currently only arrays can be declared with a specific type.

On some cases you can use a Hashtable instead of a Select or If .. Else If statements.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
program variables tremara1 Questions (Windows Mobile) 2 10-16-2008 07:52 AM
Using enumerations in Basic4ppc rossj Questions (Windows Mobile) 6 06-20-2008 07:00 PM
Environment Variables Zenerdiode Questions (Windows Mobile) 1 05-22-2008 03:36 PM
Dim-ing variables colin9876 Questions (Windows Mobile) 8 11-17-2007 05:47 PM
Structure variables Erel Code Samples & Tips 0 05-19-2007 10:36 AM


All times are GMT. The time now is 11:43 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0