Visual Basic Question
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hey there I've just started to learn programming and using visual basic 6 (teaching myself) would really appreciate it if someone could explain to me how it is that variables work and exactly how to use them as this part has got me stumped. Thanx a million Style Work hard, Play hard
-
Hey there I've just started to learn programming and using visual basic 6 (teaching myself) would really appreciate it if someone could explain to me how it is that variables work and exactly how to use them as this part has got me stumped. Thanx a million Style Work hard, Play hard
since this is a VB6 Q. you should send it to the vb forum not vc++ anyway : you use variables to store some data in memory for processing... for example..
dim a as single dim b as single dim c as single 'here i made 3 place holders in memory for single variables. a=CSng(Text1.Text) 'read data from Text1 into memory location called a b=CSng(Text2.Text) 'read data from Text1 into memory location called b c=(a+b)/2 'get the avarage of the two numbers and store it in c for latter use MsgBox c 'use the variable c