LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2010, 04:58 PM   #1
cobrien
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Rep: Reputation: 0
Could someone help me with looping in vb


I can kinda understand how looping works, but I can't see myself using it at all.
Could somebody please help me out by explaining what looping means to them and how they've used to it?
 
Old 11-11-2010, 09:53 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
Which of the several "vb"s is your question about?
 
Old 11-11-2010, 01:56 PM   #3
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Are you referring to program loops in general, ie, repeating something a a set number of times or while/until a condition is met?
 
Old 11-11-2010, 10:22 PM   #4
cobrien
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Original Poster
Rep: Reputation: 0
I'm using vb '08 and if you could explain looping in general that would be nice. My main concern is how you would use looping
 
Old 11-11-2010, 10:45 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873
Please give us an explanation what you do actually mean with vb. Visual Basic? Virtualbox?
 
Old 11-11-2010, 11:00 PM   #6
cobrien
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Original Poster
Rep: Reputation: 0
O sorry I mean Visual Basic.
 
Old 11-11-2010, 11:09 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873Reputation: 4873
I don't think you will get much support for Visual Basic on a Linux forum, Visual Basic just doesn't work on Linux. No offense meant, but it will be better to try a forum like http://www.vbforums.com/, or google a tutorial for Visual Basic.
 
Old 11-11-2010, 11:17 PM   #8
cobrien
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TobiSGD View Post
I don't think you will get much support for Visual Basic on a Linux forum, Visual Basic just doesn't work on Linux. No offense meant, but it will be better to try a forum like http://www.vbforums.com/, or google a tutorial for Visual Basic.
thanks
 
Old 11-12-2010, 05:35 AM   #9
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Loops are used to repeat similar actions.

Suppose you have a program that collects marks. The program will loop to get each of the marks and store it in an array. It could then loop through each of the element in this array and calculate the sum, and from that calculate the average score.

In the above there were two similar actions, the first was to get the data and store it in a data structure. The second was to perform some kind of processing on the data structure. To help you better understand the power of loops maybe you can tell us what program are you intending to write?
 
Old 11-12-2010, 09:17 AM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,709

Rep: Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062Reputation: 5062
Quote:
Originally Posted by TobiSGD View Post
I don't think you will get much support for Visual Basic on a Linux forum, Visual Basic just doesn't work on Linux.
Technically true, but OpenOffice.org's macro language is based on VB and it does work on Linux.

To the OP: here's a really good introduction to programming basics, including loops:

http://ocw.mit.edu/courses/electrica...ing-fall-2008/

For Visual Basic-specific loops, the best answer is really RTFM:

http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/zh1f56zs.aspx
http://msdn.microsoft.com/en-us/library/5z06z1kb.aspx

All 3 links have example code.

Last edited by dugan; 11-12-2010 at 09:31 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
looping in script fw12 Programming 3 11-04-2009 04:48 PM
Looping in a program. googleee Programming 3 11-05-2008 11:23 PM
Not able to do looping in linux Amey Joshi Linux - Newbie 7 08-13-2008 04:25 AM
looping in mplayer zexter Linux - Software 1 12-22-2003 05:39 PM
[C] for looping problem wuck Programming 6 10-19-2003 05:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration