Purchase Solution

Visual Basics 2010 Beginner

Not what you're looking for?

Ask Custom Question

Please help design a program that demonstrate passing arguments ByVal and then ByRef. Help is needed with the coding.

It is suggested that I create a square function procedure and get an integer from the user then send it ByVal one time and get the result from the procedure and have the main program display the result. Then you can send it ByRef and have the procedure modify the original variable with the result which can be displayed.

Purchase this Solution

Solution Summary

The solution discusses the visual basics 2010 beginner.

Solution Preview

See attachments.

Module Module1

'function which calculate squre of a number passed as value
Private Function SquareByVal(ByVal num As Integer) As Integer
num = num * num
Return num
End Function

'function which calculate squre of a number passed as reference
Private Function SquareByRef(ByRef num As Integer) As Integer
num = num * num
Return num

End Function

Sub Main()

Dim displayResultByVal As Integer
Dim displayResultByRef As Integer

'ask user to enter ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.