[RESOLVED] Extreme Novice Problems
Hey i am a extreme novice in Visual Basic and have done only basic things like Calculator and ETC. well i have a exame tomorow and want your help on following:-
--->what is MID function? what is its syntax? give eg:
--->what is INPUTBOX function? what is its syntax? give eg:
--->what are DATA TYPES? name each of them with syntax.
--->what is IF THEN ELSE? give syntax.
--->what are FUNCTIONS AND OPERATORS? name each of them with eg and syntax
--->what are LOOP STRUCTURES? (EXTREME NOVICE GUIDE FOR IT)...
can you guys help me?????
c ya
chao
regards,
readermaniax
Re: Extreme Novice Problems
don't have any VB book with you? these are really common stuff which you should know before starting to work on any language. so please buy a good book and start learning today.
Quote:
what is MID function? what is its syntax? give eg:
Mid or Mid$ are String function which extract a substring from the middle of the source string.
syntax = Mid(Sourcestring, Start, optional Length)
example:
VB Code:
Text = "123456789"
Print Mid$(text, 3, 4) ' Displays "3456"
Quote:
what is INPUTBOX function? what is its syntax? give eg:
inputbox is also a String function which prompts user to enter string in a new Dialog box. it returns a String.
example:
VB Code:
Dim iStr As String
iStr = InputBox("Prompt Message", ["Title of the Box"],[])'actually its syntax includes many optional parameters
Quote:
what is IF THEN ELSE? give syntax.
this is a Decision Control Structure to implement a block of statements depending on certain condition(s).
syntax:
VB Code:
if [i]condition[/i] Then
[i]statements[/i]
End If
' another with Else
if [i]condition[/i] Then
[i]statements 1[/i]
Else
[i]statements 2[/i]
example:
VB Code:
Dim num as Integer: num = 5
if num = 10 Then
Print "Yes"
Else
Print "No"
Quote:
what are LOOP STRUCTURES? (EXTREME NOVICE GUIDE FOR IT)
Loop structures like For, While, Do-While, Do-Until etc involves repeating some portion of the program either a specified number of times or until a particular condition is specified.
Syntax & example:
VB Code:
'FOR Loop
dim i As integer
For i = 1 to 10
Print i
Next i
'While loop
i = 0
While i < 10
print i
i = i +1
Wend
'Do-while
i=0
Do
Print i
i = i + 1
Loop While i < 10
Quote:
what are FUNCTIONS AND OPERATORS? name each of them with eg and syntax
sounds confusing. what kind of functions?? functions can be native (like Mid in your example) or may be programmer-made.
and you cannot name all native functions of VB, its a huge list and you need an extremely good book to take a look at all of them.
Quote:
what are DATA TYPES? name each of them with syntax.
Again a very big question, and will need a good book. just for getting started, there are few Data types (from my head), namely:
Code:
Integer - holding integer values from -32768 to +32767
Long - holding integer values from -2147483648 to +2147483647
Single - holding real values from -3.4 E38 to +3.4 E38
Double - holding real values from -1.7 E308 to +1.7 E308
String - Holding all keyboard stuff within " " (quoattion marks)
Currency - can hold vary large data (numeric)(i have no idea).
Variant - this can hold any type of data and a large amount of data
Hope it helped you a bit.
Harsh Gupta
Re: Extreme Novice Problems
Moved to General Developer
Re: Extreme Novice Problems
[b]thanx Harsh For The Fast Responese........i Really Thank You...
Re: Extreme Novice Problems
Re: Extreme Novice Problems
Quote:
Originally Posted by Harsh Gupta
who's VISHAL?? :/
:lol: Your evil twin perhaps? :D
Re: Extreme Novice Problems
Quote:
Originally Posted by Hack
:lol: Your evil twin perhaps? :D
maybe ;)