Home > CBM > BASIC > Keywords > Len 180 Subpages: (divide), (equal), (less), (minus), (more), (multiply), (plus), (power), Abs, And, Append, Asc, Atn, Auto, Backup, Bank, Begin, Bend, Bload, Boot, Box, Bsave, Bump, Catalog, Char, Chr, Circle, Close, Clr, Cmd, Collect, Collision, Color, Concat, Cont, Copy, Cos, Data, Dclear, Dclose, Dec, Def, Delete, Dim, Directory, Dispose, Dload, Do, Dopen, Draw, Ds, Ds string, Dsave, Dverify, El, Else, End, Envelope, Er, Err, Exit, Exp, Fast, Fetch, Filter, Fn, For, Fre, Get, Get num, Getkey, Go, Gosub, Goto, Graphic, Gshape, Header, Help, Hex, If, Input, Input num, Instr, Int, Joy, Key, Left, Let, List, Load, Locate, Log, Loop, Mid, Monitor, Movspr, New, Next, Not, Off, On, Open, Or, Paint, Peek, Pen, Pi, Play, Pointer, Poke, Pos, Pot, Print, Print num, Pudef, Quit, Rclr, Rdot, Read, Record, Rem, Rename, Renumber, Restore, Resume, Return, Rgr, Right, Rlum, Rnd, Rreg, Rspcolor, Rsppos, Rsprite, Run, Rwindow, Save, Scale, Scnclr, Scratch, Sgn, Sin, Sleep, Slow, Sound, Spc, Sprcolor, Sprdef, Sprite, Sprsav, Sqr, Sshape, St, Stash, Step, Stop, Str, Swap, Sys, Tab, Tan, Tempo, Then, Ti, Ti string, To, Trap, Troff, Tron, Until, Using, Usr, Val, Verify, Vol, Wait, While, Width, Window, Xor |
| Keyword | Abbreviation | Token (hex) | Version(s) | Classification | | LEN | none | C3 | 1.0+ | Function |
LEN ( string ) | Parameters | Type | Legal Value(s) | Default Value | Note(s) | | string | String | any | | |
| Returns | Type | Value(s) | Note(s) | | number | Integer | 0 to 255 | |
Returns the number of characters in a text string.
The LEN function simply returns the number of characters in the given string. Useful for testing or manipulating strings. TYPE MISMATCH ERROR is generated if a numeric expression or variable is supplied as a "string". Examples:
PRINT LEN("")
0
READY.
PRINT LEN("65")
2
READY.
PRINT LEN(65)
?TYPE MISMATCH ERROR
READY.
PRINT LEN(STR$(65))
3
READY.
PRINT LEN(CHR$(65))
1
READY.
PRINT LEN(HEX$(65))
4
READY.
|
© H2Obsession, 2014 |