Ord(), Output, 850 appendix a: functions and instructions – Texas Instruments TITANIUM TI-89 User Manual

Page 850

Advertising
background image

850

Appendix A: Functions and Instructions

or

MATH/Test menu

Boolean expression1

or

Boolean expression2

Boolean

expression

Returns true or false or a simplified form of the
original entry.

Returns true if either or both expressions simplify
to true. Returns false only if both expressions
evaluate to false.

Note: See

xor

.

x‚3 or x‚4

¸

x

3

Program segment:

©

If x<0 or x‚5

Goto END

©

If choice=1 or choice=2

Disp "Wrong choice"

©

integer1

or

integer2

integer

Compares two real integers bit-by-bit using an

or

operation. Internally, both integers are converted
to signed, 32-bit binary numbers. When
corresponding bits are compared, the result is 1 if
either bit is 1; the result is 0 only if both bits are
0. The returned value represents the bit results,
and is displayed according to the

Base

mode.

You can enter the integers in any number base.
For a binary or hexadecimal entry, you must use
the 0b or 0h prefix, respectively. Without a prefix,
integers are treated as decimal (base 10).

If you enter a decimal integer that is too large for
a signed, 32-bit binary form, a symmetric modulo
operation is used to bring the value into the
appropriate range.

Note: See

xor

.

In Hex base mode:

0h7AC36 or 0h3D5F ¸ 0h7BD7F

In Bin base mode:

0b100101 or 0b100 ¸ 0b100101

Note: A binary entry can have up to 32 digits
(not counting the 0b prefix). A hexadecimal
entry can have up to 8 digits.

ord()

MATH/String menu

ord(

string

)

integer

ord(

list1

)

list

Returns the numeric code of the first character in
character string

string

, or a list of the first

characters of each list element.

See Appendix B for a complete listing of character
codes.

ord("hello")

¸

104

char(104)

¸

"h"

ord(char(24))

¸

24

ord({"alpha","beta"})

¸

{97 98}

Output

CATALOG

Output

row

,

column

,

exprOrString

Displays

exprOrString

(an expression or character

string) on the Program I/O screen at the text
coordinates (

row

,

column

).

An expression can include conversion operations
such as

4444DD

and

4444Rect

. You can also use the

4

operator to perform unit and number base
conversions.

If

Pretty Print = ON

,

exprOrString

is “pretty

printed.”

From the Program I/O screen, you can press ‡ to
display the Home screen, or a program can use

DispHome

.

Program segment:

©

:RandSeed 1147

:ClrIO

:For i,1,90,10

: Output i, rand(100),"Hello"

:EndFor

©

Result after execution:

Important:

Zero, not the letter O.

Advertising