• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Exam coming up, I have questions I need help answering.

I have an upcoming exam and I don't have access to my professor and I have questions that the book is not clarifying for me.  The book that the class is using is Murach's Visual Basic 2008.

iI will list the questions will by numbers.  I understand that there are alot of questions here but I really need a good grade on this exam and these are the areas that I am still unsure of.  Some of the questions, I have tried to answer and I posted a comment in (), it my guess is correct could you annotate so.  If not could you help me get on base.

I am taking the exam tomorrow at 11.  I have been buried in this book for a couple of days now and I need help.  I am using this site as a last resort.  I figured individuals on here are much more proficient than myself so I mine as well ask the experts.  

I want to thank anyone in advance that is willing to answer any of these questions for me.  God Bless and Happy Veterans Day.  I myself am an "Iraq Veteran" in 2003.2. How to code and call procedures/functions?
                - What is the difference between a function and a sub procedure?  
                     - I understand that a sub procedure doesn't return any data and a function returns a value.  
                              -What does a value mean?
-      how to code sub procedures?
          - I understand based on the book how to code a sub procedure.
-      how to call sub procedures?
          - I understand based on the book how to call a sub procedure.
-      What I dont understand nor does it show is the two together in code.  
       Are you able to put the two together and if so what does it look like?  The book gives me these
       examples for each.  Can you put the two together and define it for me?

Procedure with two parameters:
Private Sub GetDiscountPercent (ByVal subtotal As Decimal, ByRef discountPercent As Decimal)
       If subtotal >= 500 Then
           discountPercent = .2m
       Else
           discountPercent = .1
       End If
End Sub

A statement that passes two arguments

Me.GetDiscountPercent (subtotal, discountPercent)
0
nosurf2day
Asked:
nosurf2day
  • 2
1 Solution
 
DhaestCommented:
How to Create a Function in VB .NET
http://www.homeandlearn.co.uk/net/nets9p5.html

Create your Own Subs in VB .NET
http://www.homeandlearn.co.uk/net/nets9p2.html

Functions VS Subroutines and By Val Vs By Ref in VB.NET
http://www.codeproject.com/KB/aspnet/VBnet_Methods.aspx
0
 
DhaestCommented:
0
 
nosurf2dayAuthor Commented:
I am going to book mark this site.  It was very helpful.  Thank you.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now