.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Passing variables.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
155 Views, 4 Replies
03-15-2012 02:05 PM
Can someone suggest what is wrong here?
Diameter is passed in as 12.7 but it is not acceptint it as a true statement.
Function Volume(Diameter As Single)
If Diameter = 12.7 Then
end if
End Function
Solved! Go to Solution.
Re: Passing variables.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-15-2012 02:25 PM in reply to:
SRSDS
Function Volume(ByVal Diameter As Single) As Boolean
If Diameter = CSng(12.7) Then
Return True
Else
Return False
End If
End Function
---------------------------

“We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”

“We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
Re: Passing variables.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-15-2012 02:44 PM in reply to:
arcticad
Thanks again!!
Re: Passing variables.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-10-2012 03:32 AM in reply to:
SRSDS
I think this will do it too:
If Diameter = 12.7# Then end if
Re: Passing variables.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-10-2012 09:33 AM in reply to:
sbarlage
Hi,
Don't make VB more verbose than it is...
Function Volume(ByVal Diameter As Single) As Boolean
Return Diameter = 12.7F
End FunctionBut why using a Single rather than a Double ?
Gilles Chanteau
