Visual Basic 6 programming: Learn programming with Visual Basic 6 by Unknown
Author:Unknown
Language: eng
Format: epub
Publisher: Nika Pataraia
Published: 2016-03-28T22:00:00+00:00
Table 6.1: Arithmetic Operators
Operator
Mathematical function
Example
^
Exponential
2^4=16
*
Multiplication
4*3=12,
/
Division
12/4=3
Mod
Modulus (returns the remainder from an integer division)
15 Mod 4=3
\
Integer Division(discards the decimal places)
19\4=4
+ or &
String concatenation
"Visual"&"Basic"="Visual Basic"
Example 6.1
Private Sub Command1_ Click()
Dim firstName As String
Dim secondName As String
Dim yourName As String
firstName = Text1.Text
secondName = Text2.Text
yourName = secondName + " " + firstName
Label1.Caption = yourName
End Sub
In this example, three variables are declared as string. For variables firstName and secondName will receive their data from the user’s input into textbox1 and textbox2, and the variable yourName will be assigned the data by combining the first two variables. Finally, yourName is displayed on Label1.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Brazilian Economy since the Great Financial Crisis of 20072008 by Philip Arestis Carolina Troncoso Baltar & Daniela Magalhães Prates(264560)
International Integration of the Brazilian Economy by Elias C. Grivoyannis(111293)
The Art of Coaching by Elena Aguilar(53384)
Flexible Working by Dale Gemma;(23315)
How to Stop Living Paycheck to Paycheck by Avery Breyer(19771)
Thinking, Fast and Slow by Kahneman Daniel(12408)
The Acquirer's Multiple: How the Billionaire Contrarians of Deep Value Beat the Market by Tobias Carlisle(12373)
The Radium Girls by Kate Moore(12086)
The Art of Thinking Clearly by Rolf Dobelli(10585)
Hit Refresh by Satya Nadella(9181)
The Compound Effect by Darren Hardy(9040)
Tools of Titans by Timothy Ferriss(8472)
Atomic Habits: Tiny Changes, Remarkable Results by James Clear(8402)
Turbulence by E. J. Noyes(8101)
A Court of Wings and Ruin by Sarah J. Maas(7926)
Change Your Questions, Change Your Life by Marilee Adams(7838)
Nudge - Improving Decisions about Health, Wealth, and Happiness by Thaler Sunstein(7751)
How to Be a Bawse: A Guide to Conquering Life by Lilly Singh(7539)
Win Bigly by Scott Adams(7247)