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.

arraylist

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-13-2010, 11:41 AM
Junior Member
 
Join Date: Feb 2010
Posts: 33
Default arraylist

Hello
Can anybody tell me how to represent items of an arraylist in a single messageBox,separated by "*"?
I have created my first application that does Factorization,but can't represent the result to the user in a single msgbox
Attached Files
File Type: sbp math.sbp (1.1 KB, 4 views)
File Type: txt primeNumbers.txt (7.0 KB, 7 views)
Reply With Quote
  #2 (permalink)  
Old 03-13-2010, 12:39 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Here you have a solution.
I modified your For-Next loop and Goto by two Do-Loop Until loops.

What is the type variable 'mn' for ? It's not used.

Best regards.
Attached Files
File Type: sbp math1.sbp (1.8 KB, 7 views)
__________________
Klaus
Switzerland
Reply With Quote
  #3 (permalink)  
Old 03-13-2010, 04:10 PM
Junior Member
 
Join Date: Feb 2010
Posts: 33
Smile arraylist

Thanx a lot Klaus.
Although your Math1 version won't work,I have found the solution to my problem.
according to you:
i=0
do
do
a=n/arraylist2.item(i)
.........................
loops with the same value,that i 2.

variable "mn" IS used and it's a russian contraction for "multiplier"

The final version of my "masterpiece" is attached.
Attached Files
File Type: sbp math2.sbp (1.6 KB, 5 views)
File Type: txt primeNumbers.txt (7.0 KB, 4 views)
Reply With Quote
  #4 (permalink)  
Old 03-13-2010, 05:04 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Why do you say that Math1.sbp doesn't work ?

I compared results between Math1 and Math2 no difference.
When you find a factor, for example 5, there is no need to try with 2 and 3 again you already know that there are none they were already tested.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #5 (permalink)  
Old 03-13-2010, 05:36 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 762
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by nick2210 View Post
variable "mn" IS used and it's a russian contraction for "multiplier"
I imagine that Klaus means that it is not used as a global structure. You may have a future usage in mind but at the moment the two elements of the structure might just as well be separate local variables in Sub Button1_Click. And the index element is write-only.

I would have understood the program faster if the two arraylists had distinctive names rather than the defaults.

I'll keep out of the discussion of program operation...

Mike.
Reply With Quote
  #6 (permalink)  
Old 03-13-2010, 07:30 PM
Junior Member
 
Join Date: Feb 2010
Posts: 33
Smile arraylist

I beg your pardon Klaus,your version runs smoothely.I just was launching it in the wrong folder(without .txt file)
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
ArrayList how do you use it??? apstrojny2 Questions (Windows Mobile) 4 12-25-2009 09:20 AM
Sort an arraylist ExcludeReality Questions (Windows Mobile) 2 12-08-2009 04:24 PM
I need help on ArrayList and AddArrayList claudio Questions (Windows Mobile) 7 05-30-2009 12:11 PM
ArrayList Bobbes German Forum 2 02-25-2008 09:36 PM
Arraylist tvrman Questions (Windows Mobile) 7 07-01-2007 11:42 AM


All times are GMT. The time now is 09:40 PM.


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