Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 January 14th, 2005, 10:47 AM
Authorized User
 
Join Date: Oct 2004
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default 5 Questions in VB

Hi,

My questions are:

1.what is the difference between Client Server & Web Server
2. Difference between Public and Global?
3. Difference between Byval & ByRef
4. What is ParamArray and when it should be used.
5. When the memory is allocated to variables in VB?


A.D.Ramkumar
__________________
Ramkumar A D
 
Old January 14th, 2005, 01:06 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

1
A web server responds to internet-style requests, such as those that Internet Explorer would submit. Though a client server exposes resources (folders, files, printers, etc.), it does not respond to internet-style requests.

2
No difference between public and global. Public has been preferred for a while.

3
ByVal creates a new instance of the value being passed, and then passes a reference to that new resource. That new resource is abandoned after the function ends.
ByRef causes the variable within the called function to use the same piece of memory that the calling routine is using. Therefore, if the value is changed within the called function, you will have that new value within the calling function when you get back there.

5
Public variables are allocated when the program initializes.
In VB 6, the local variables in a routine are allocated when the routine initializes, no matter where in the routine they are Dim'd.
In VB.NET, variables are initialized when they come into scope. In .NET, you can restrict a variable's scope to a block of code, something that VB6 won’t do. If you do that in .NET, the memory is allocated when the variable comes into scope.
(Actually, if you read through that, you'll see that [u]all</u> variables allocate their memory when tey come into scope, but I just delineated where that 'comming into scope' takes place for various situations.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Interview Questions, C# Interview Questions, dotnetuncle .NET Framework 2.0 4 June 22nd, 2019 07:03 AM
vb.net 20005 Questions, Please help me compad VB.NET 0 July 30th, 2008 04:30 AM
Good VB interview questions are needed. BigDude Access VBA 1 August 30th, 2005 07:40 AM
VB Questions priyanka123 VB How-To 5 May 24th, 2004 07:53 AM
Please go through this questions phpsharma PHP How-To 0 November 4th, 2003 03:26 AM





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