Home > CBM > BASIC > Keywords > Rwindow
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, Len, 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, 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

KeywordAbbreviationToken (hex)Version(s)Classification
RWDINDOWR{Shift+W}CE 097.0Function

  Syntax  
RWINDOW ( info )

ParametersTypeLegal Value(s)Note(s)
infoUnsigned Byte0. get window height -1
1. get window width -1
2. get screen width

ReturnsTypeValue(s)Note(s)
valueInteger
0 to 79

  Purpose  
Return information about the active text editor.

  Remarks  
RWDINDOW sounds like it should be the complement to WINDOW, but unfortunately none of the possible values that may retrieved correspond with any parameter of WINDOW.  To make maters worse, the returned window "height" and "width" are off by one... epic fail!

It seems most useful to determine which editor of the C128 is active (40-column VIC-II or 80-column VDC) with WINDOW(2).  If you would like to know the active parameters of WINDOW (left, top, right, or bottom) then you will need to take a PEEK at some secret variables.  Some CBM machines with pre-7.0 versions of BASIC support windows via the KERNAL/Editor (not directly with BASIC).  For them, peeking at secret variables is the only option.

The returned value will be (based on info):

  1. the active window's "height" = bottom - top (NOTE: this is the physical height -1)
  2. the active window's "width" = right - left (NOTE: this is the physical width -1)
  3. the active screen's width (thankfully, this is correct: 40 or 80)

If info is omitted, or is an invalid expression, SYNTAX ERROR occurs.  If info is not numeric, TYPE MISMATCH ERROR occurs; you may manually convert strings with VAL.  If info is floating-point, it is automatically converted with INT.  If the result is not a Legal Value (see table above), then ILLEGAL QUANTITY ERROR occurs.


Examples (in 80-column mode, full-screen [no window active]):

PRINT RWINDOW("0")

?TYPE MISMATCH ERROR 
READY.
PRINT RWINDOW(0)
 24 

READY.
PRINT RWINDOW(1)
 79

READY.
PRINT RWINDOW(2)
 80

READY.

  Compare With  
POS, RDOT, RSPPOS

  Contrast With  
SCALE, WINDOW

  See Also  
CHAR, PRINT


© H2Obsession, 2014