beautypg.com

Right – Remote Processing CAMBASIC User Manual

Page 143

background image

Comm ands - 110

RIGHT$

String Function

SYNTAX:

n$ = RIGHT $(m$, p)

PURPOSE:

To re turn the r ight– most p characters of m$ as a string.

REMARK S:

If p i s g r e at e r t ha n or e q ua l t o L E N (m$), then m$ is returned. If p is zero, a null string is returned.

RELATED:

LEFT$, MID$, LEN, INSTR

EXAMPLE:

10 A$ = "ABCDEFG"
20 PRINT RIGHT$(A$,3)
RUN
EFG

ERROR:

< Data negative> – for p
< Data > 255> – for p