Quick Basic And Visual Basic Flashcards

1
Q

How do you join pieces of a PRINT command in QB?

A

To use multiple variables or strings in a command, put a semicolon between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you put the cursor in a specific spot in QB?

A

Use the LOCATE command and then x coordinate, y coordinate. Note: x and y are opposite from in math class.
Ex: LOCATE 10, 20 (10 down, 20 right)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is LOCATE 0, 0 a valid command in QB?

A

No. Values cannot be 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you choose a background color in QB?

A

Add the background color after the text color with a comma.

Ex: COLOR 5, 15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you format a PRINT USING in QB?

A

PRINT USING “\ \ $###.##”; “Word”, 1.111

^ description of this as answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the rules for variable names?

A

Must start with a letter
No special characters or spaces
Cannot be a command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you use INPUT in QB?

A

INPUT “Question”; Variable, Variable2

^ description of this as answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you create a random number in QB or VB?

A

Use RND. To create between two numbers, use
INT(RND*(difference + 1) + min)
Use Randomize Timer near the beginning of the program for QB, and Randomize right in front of the command in VB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you convert a number to a string?

A

STR()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you convert a string to a number?

A

VAL()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CHR()?

A

It returns the character associated with an ASCII code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is ASC()?

A

It returns the ASCII code associated with a character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you find the length of a string?

A

LEN()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you change case of a string?

A

UCASE() or LCASE()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does RIGHT(string, n) do?

A

Returns the rightmost n characters in string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does LEFT(string, n) do?

A

Returns the leftmost n characters in string.

17
Q

What does MID(string, m, n) do?

A

returns n characters starting with the ‘m’th character.

18
Q

How would you find characters in the middle of a string?

A

MID(string, m, n) - m is the character you start on, n is number of characters.

19
Q

How do you join pieces of a PRINT command in visual basic??

A

To use multiple variables or strings in a command, put a plus sign between them.