eltony Posted April 24, 2012 Author Share Posted April 24, 2012 well this what i learn so far :D i learn how to draw and add commands and simple scripts that calculate for exampleprivate sub form_activate()A="I'B="Love"C="Elipse"D="Origins"Print A+B+C+Dend subresult should be "I Love Eclipse Origins"rada rada rada rada rada! Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 24, 2012 Share Posted April 24, 2012 I doubt it.Edit:_« Last Edit: **Today** at 05:46:13 AM by Eltony »_ Link to comment Share on other sites More sharing options...
eltony Posted April 24, 2012 Author Share Posted April 24, 2012 doubt what? Link to comment Share on other sites More sharing options...
The New World Posted April 24, 2012 Share Posted April 24, 2012 Quit using it as VBScript, add Option Explicit to the top of your modules, this will forced you to define your variables as data types such as integers, doubles, longs, and strings. Link to comment Share on other sites More sharing options...
eltony Posted April 24, 2012 Author Share Posted April 24, 2012 @Rose can you give me a example it'll be helpfull Link to comment Share on other sites More sharing options...
The New World Posted April 24, 2012 Share Posted April 24, 2012 …```Option Explicit' Global Variable(s) 'Dim i1 as integerDim i2 as integer = 0Public Sub Dumb_Sub ()' Local Variable(s) 'Dim i3 as integer i2 = Get_i1 i3 = i2 * i3End SubPublic Function Get_i1() as Integer Get_i1 = i1End Function``` Link to comment Share on other sites More sharing options...
eltony Posted April 24, 2012 Author Share Posted April 24, 2012 ah ok lol thanks i get it now… but i got an error at "Dim i2 as integer = 0" i get compile error expected end of statement o,x i dont get it... Link to comment Share on other sites More sharing options...
The New World Posted April 24, 2012 Share Posted April 24, 2012 @Eltony:> ah ok lol thanks i get it now… but i got an error at "Dim i2 as integer = 0" i get compile error expected end of statement o,x i dont get it...My bad, don't think you can declare variables in the global region with a value like = 0 without it being a constant variable. xP Link to comment Share on other sites More sharing options...
eltony Posted April 24, 2012 Author Share Posted April 24, 2012 so should i just leave it like that?' Global Variable(s) 'Dim i1 as integerDim i2 as integer Link to comment Share on other sites More sharing options...
The New World Posted April 24, 2012 Share Posted April 24, 2012 Yeah, unless you need to make a constant global variable. Then you'd …Const VariableName as DataType = Value Link to comment Share on other sites More sharing options...
eltony Posted April 24, 2012 Author Share Posted April 24, 2012 ah ok hehe thanks rose for the help i learn something new today Link to comment Share on other sites More sharing options...
viciousdead Posted April 24, 2012 Share Posted April 24, 2012 @Eltony:> A="I'> B="Love"> C="Elipse"> D="Origins"> > result should be "I Love Eclipse Origins"rada rada rada rada rada!Not to be a downer, but printing the strings A, B, C, and D, without adding spaces, will result in, "ILoveElipseOrigins"… xD Link to comment Share on other sites More sharing options...
eltony Posted April 25, 2012 Author Share Posted April 25, 2012 @ViciousDead:> Not to be a downer, but printing the strings A, B, C, and D, without adding spaces, will result in, "ILoveElipseOrigins"… xDhehe oops true i forget o.x Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now