-
easy question for beginner without any docs
Hey we have some study for school to do but we can't understand how to declare
global varial and how to calculate a sum of numbert which are negativ and
positiv (i mean how to declare signed numbers)
please help us quickly
-
Re: easy question for beginner without any docs
> Hey we have some study for school to do but we can't understand how to
declare
> global varial
Instead of:
Dim s as String
Use:
Global s As String
>and how to calculate a sum of numbert which are negativ and
> positiv (i mean how to declare signed numbers)
> please help us quickly
Are you asking how to make a variable negative? Just do:
i = -1
If you want a sum then:
Sum = Num1 + Num2 + Num3
-
Re: easy question for beginner without any docs
"jm" <eos@hotmail.com> wrote:
>
>Hey we have some study for school to do but we can't understand how to declare
>global varial and how to calculate a sum of numbert which are negativ and
>positiv (i mean how to declare signed numbers)
>please help us quickly
Jm,
To declare a global variabe use:
Public x as Integer 'Global for project
Private x as Integer 'Global for current module only.
To declare a signed number: There is no such thing as an unsigned number
in VB. All longs, integers, doubles are signed.
Dim x as Integer
x = -5
To sum numbers just add them: x = a + b + c
Nick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks