• Log in or sign up for an account here: https://www.sythe.org/login

ReadLn In VB

Jukka

Active Member
Joined
Nov 23, 2005
Sythe Gold
0
Messages
244
Age
34
Location
Finland, Helsinki
Question 1)
In scar when i want the user to enter a number i do:

String := ReadLn('Enter text or numbers');

What readln does is it pops up a box which then has the entered text. It returns the answer you give when you press OK, to the string.

What im asking is:

How would i do a this simple statement in Visual basic 6.0?

------------------
Question 2)
In scar to return a random number i do: Random(1000) it then returns a random integer.

How do i do this in Visual basic 6.0?
 
Another question:

In scar i would do
StrToInt
Which stands for: String To Integer

Is there anything like that in VB?
 
Le Monkey
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Val()
 
Originally Posted by SMR
Val()
As TerranKiller said using Int() and Str() is faster and more effective because then VB knows what type of value it is parsing.

The Val() function is slower in the same way that using Variants is slower than String and Integer functions.
 
As TerranKiller said using Int() and Str() is faster and more effective because then VB knows what type of value it is parsing.

The Val() function is slower in the same way that using Variants is slower than String and Integer functions.

wrong.....
val() does a string to double, there are no variants involved....
 
I didn't say it used Variants. I said it's slower IN THE SAME WAY that variants are slower than integers/strings meaning that it's just to do with weird VB6 variable/function preference. In the same way VB6 will sometimes lag like hell looping through integers but use long variables in your loops and it should run perfectly smooth.
 
Runescape Gamblingrunescape gambling
Back
Top