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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

How to clear a structure (value) ?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2010, 07:06 PM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 164
Default How to clear a structure (value) ?

Hi,
As an example, say a structure is used to store information of two individual's ID,Name,Sex.


Structure declared :

Sub Globals
Dim Type(ID, Name ,Sex) person(1)
End Sub

the values are like :

person(0).ID = 222
person(0).Name = "John"
person(0).Sex = M

person(1).ID = 333
person(1).Name = "Tracey"
person(1).Sex = F

How to clear the structure (values), so that new information could be stored say for two individuals of another House?


regards,
Reply With Quote
  #2 (permalink)  
Old 07-09-2010, 08:09 PM
Knows the basics
 
Join Date: May 2010
Posts: 92
Default

Why not just redeclare the values?
Reply With Quote
  #3 (permalink)  
Old 07-10-2010, 06:58 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can redeclare an array of structures with:
Code:
'Dim person(<Number of items>, <Number of fields>)

Dim person(23)
Note that there is a small mistake in your code as the array should be declared with person(2).
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
clear combo box tremara1 Bug Reports 3 01-03-2009 07:32 AM
How to clear image control? RB Smissaert Questions (Windows Mobile) 9 12-27-2008 11:42 PM
clear all textboxes tremara1 Questions (Windows Mobile) 0 10-22-2008 08:39 AM
Clear TextBox? cdeane Questions (Windows Mobile) 2 04-21-2008 07:16 PM
How to clear the screen ? gjoisa Questions (Windows Mobile) 1 03-11-2008 04:50 PM


All times are GMT. The time now is 04:58 AM.


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