Wrox Programmer Forums
|
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2012, 02:10 PM
Registered User
 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CODING TOWIC

Dear Sirs vThearon Willis / Bryan Newsome.

Sir I am beginner in computer programming and I am reading book Beginning Microsoft Visual Basic 2010 Wrox Publication, really i am very much enjoying your book for programming also i taken admisson in Computer Institue in Dubai but i am very confused coz, my teacher programming coding for visual basic very different from your book.

In book page 140 (Using Constant) that coding is twice is bad programming pratice. But my teached teach me coding like dat for array sorting. Really its very hard to understand me. Kidly tell me below mentioned coding is good or bad for vb programming.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim a(10) As Integer
Dim i, n, j, k As Integer
n = InputBox("enter limit")
For i = 1 To n
a(i) = InputBox("Enter Values")
Next
For i = 1 To n
For j = i + 1 To n
If a(i) > a(j) Then
k = a(i)
a(i) = a(j)
a(j) = k
End If
Next
Next
ListBox1.Items.Clear()
For i = 1 To n
ListBox1.Items.Add(a(i))
Next
End Sub
End Class
[/FONT]

Last edited by Irfan Hussain; June 22nd, 2012 at 02:18 PM.. Reason: I wanna explain in more detail.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert DAO Coding to ADO Coding udaybg1 VB How-To 0 August 9th, 2011 08:50 AM
Need help with coding Gini Visual Studio 2008 2 March 6th, 2009 04:14 PM
Help coding here Scoob PHP How-To 3 January 26th, 2006 11:18 AM
coding mdlan PHP Databases 1 May 28th, 2005 07:40 PM
can someone help me in coding this? somanchivasu Access 1 April 5th, 2004 02:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.