home *** CD-ROM | disk | FTP | other *** search
- CDBSE&File
- &Open... Ctrl+O
- &Save Ctrl+S
- Save &As...
- saveas
- &Import...
- import
- &Export...
- export
- Print Set&up...
- printsetup
- &Print Pages... Ctrl+P
- printpages
- Prin&t Report...
- printreport
- Send &Mail...
- sendmail
- &Run...
- E&xit Alt+F4
- &Edit
- &Undo Ctrl+Z
- Cu&t Ctrl+X
- &Copy Ctrl+C
- &Paste Ctrl+V
- paste
- C&lear Del
- clear
- Select &All Shift+F9
- selectall
- Select Pa&ge Shift+F12
- selectpage
- &Size to Page F11
- sizetopage
- F&ind... F5
- Re&place...
- replace
- Aut&hor F3
- author
- &Text
- &Character... F6
- character
- &Paragraph... F7
- paragraph
- &Regular Ctrl+Space
- regular
- &Bold Ctrl+B
- &Italic Ctrl+I
- italic
- &Underline Ctrl+U
- underline
- Stri&keout Ctrl+K
- strikeout
- Superscrip&t/Subscript
- superscriptSubscript
- &Normal Script
- normalscript
- Su&bscript Ctrl+L
- subscript
- Su&perscript Ctrl+Shift+L
- superscript
- &Show Hotwords F9
- showhotwords
- &Page
- &Next Alt+Right
- &Previous Alt+Left
- previous
- &First Alt+Up
- first
- &Last Alt+Down
- &Back Shift+F2
- &History... Ctrl+F2
- history
- N&ew Page Ctrl+N
- newpage
- &Help
- &Contents F1
- contents
- Status &Bar F12
- statusbar
- ?benchmark
- buttonDown
- buttonUp
- buttonClick
- enterApplication
- leaveApplication
- enterBook
- leaveBook
- enterBackground
- leaveBackground
- enterPage
- leavePage
- keyDown
- keyUp
- firstIdle
- -$, #?
- +',$!
- window bmp1 state maximized
- play bmp1
- status bmp1 window
- bDown
- scanning
- stoats8.bmp alias bmp1 style
- child parent
- EnterPage
- close all
- leavePage
- scanning
- location
- bDown
- .'+ +F
- scanning
- .'+ +F
- .'+ +F
- +#,"Y
- +#,"Y
- curLoc
- scanning
- location
- curLoc
- bmpLoc
- where bmp1 source wait
- +#,"Y
- +#,"Y
- status bmp1 position wait
- curLoc
- +#,"Y
- V, #?
- +#,"Y
- V, #>
- window bmp1 position
- bmpLoc
- That's a string.
- That's a negative number.
- That's a fraction.
- You have entered zero.
- Please enter a positive integer.
- iFactorial2
- TO GET iFactorial2 n
- ZREAL @result
- ZSTRING s
- ZLONG i
- xisType(
- s = "That's a
- 1INT,n)
- n < 0
- s = "
- 5negative
- n = 0
- s = "You have entered zero."
- "WORD",n)
- s = "
- fraction."
- s & CRLF & "Please
- a positive integer."
- keyDown
- TO HANDLE
- ZLONG i, cc
- k <> keyEnter
- = NULL
- cc =
- = SPACE
- R(i + 1)
- cc = cc - 1
- Removes Double Spaces.
- Type in the field below, then press Enter:
- enterPage
- NOTIFYAFTER
- TO GET iFactorial2 n
- local REAL @result
- local STRING s
- local LONG i
- conditions
- when not isType(REAL,n)
- s = "That's a string."
- break conditions
- when isType(INT,n) and n < 0
- s = "That's a negative number."
- break conditions
- when n = 0
- s = "You have entered zero."
- break conditions
- when not isType("WORD",n)
- s = "That's a fraction."
- break conditions
- else
- @result = 1
- step i from 1 to n
- @result = @result * i
- end step
- return @result
- end conditions
- return s & CRLF & "Please enter a positive integer."
- END iFactorial2
- enterPage
- sdfg sf sf 'sdf sflg slfg sf;'l sflg sfdgllllll
- TO GET
- z = (
- It) * xs
- z = (
- It) * ys
- TO SET
- )/xs & "," \
- )/ys && "
- stoats
- stoats8.bmp
- \stoats8.
- <BookPath>
- :HDMEDIAPATH
- System
- Arial
- Pusharound
- Page 5
- Scroll
- Number of Colors Available
- Screen Resolution in Pixels
- enterPage
- TO HANDLE
- B"sr"
- = "Screen Resolution
- Pixels"
- B"mc"
- = "Number
- Colors Available"
- Number of Colors Available
- displayBitsPerPixel
- rpdisplayBitsPerPixel
- TB30WIN.DLL
- buttonClick
- TO HANDLE buttonClick
- ZLONG p
- linkDLL "TB30WIN.
- INT displayBitsPerPixel()
- p = 2 ^
- unLinkDLL "
- = "Number
- Colors Available"
- Number of Colors Available
- enterPage
- button
- buttonDown
- NOTIFYBEFORE
- = NULL
- NOTIFYAFTER
- 9verticalDisplayRes
- horizontalDisplayRes
- verticalDisplayRes
- Screen Resolution in Pixels
- TB30WIN.DLL
- horizontalDisplayRes
- buttonClick
- TO HANDLE buttonClick
- ZPOINT p
- linkDLL "TB30WIN.
- horizontalDisplayRes()
- 3verticalDisplayRes()
- :es()
- unLinkDLL "
- = "Screen Resolution
- Pixels"
- Screen Resolution in Pixels
- enterPage
- buttonDown
- factorial
- Factorial
- TO GET Factorial n
- ZREAL @result
- ZLONG i
- xisType ("WORD", n))
- (n = 0)
- n = 1
- V = (factorial(n-1)) * n
- iterate
- enterPage
- NOTIFYAFTER
- TO GET Factorial n
- local REAL @result
- local LONG i
- if (not isType ("WORD", n)) or (n = 0)
- return 0
- end if
- if n = 1
- return 1
- end if
- @result = (factorial(n-1)) * n
- return @result
- END factorialtoriallllll
- recurse
- enterPage
- NOTIFYBEFORE
- TO GET factorial n
- local REAL @result
- local LONG i
- if not isType ("WORD", n) or n = 0
- return 0
-
- end if
- @result = 1
- step i from 1 to n
- @result = @result * i
- end step
- return @result
- END factoriallialloriallalalialialtoriallll
- factorial
- Invalid Entry. Please try again.
- keyDown
- TO HANDLE
- ZSTRING s
- k <> keyEnter
- factorial (
- s = "Invalid Entry. Please
- "f2"
- Enter value,
- then press <ENTER>:
- 3628800 Entry. Please try again.L @result
- local LONG i
- if not isType ("WORD", n) or n = 0
- return 0
-
- end if
- @result = 1
- step i from 1 to n
- @result = @result * i
- end step
- return @result
- END factorialrn @result
- END Factorial
- Answer:
- Get a Factorial!
- Select a method:
- iterate
- buttonClick
- TO HANDLE buttonClick
- "iterate"
- Iterative
- recurse
- buttonClick
- TO HANDLE buttonClick
- "recurse"
- Recursive
- enterPage
- buttonDown
- NOTIFYBEFORE
- = NULL
- NOTIFYAFTER
- enterPage
- buttonDown
- enterPage
- n @result
- END factorial
- enterPage
- buttonDown
- enterPage
- That's a string.
- That's a negative number.
- That's a fraction.
- You have entered zero.
- Please enter a positive integer.
- iFactorial2
- TO GET iFactorial2 n
- ZREAL @result
- ZSTRING s
- ZLONG i
- xisType(
- s = "That's a
- 1INT,n)
- n < 0
- s = "
- 5negative
- n = 0
- s = "You have entered zero."
- "WORD",n)
- s = "
- fraction."
- s & CRLF & "Please
- a positive integer."
- iFactorial2
- keyDown
- TO HANDLE
- ZSTRING s
- k <> keyEnter
- iFactorial2 (
- "f2"
- 5.0001
- Enter value,
- then press <ENTER>:
- That's a fraction.
- Please enter a positive integer.nteger.
- Answer:
- Get a Factorial!
- Use conditions.:
- enterPage
- NOTIFYAFTER
- TO GET iFactorial2 n
- local REAL @result
- local STRING s
- local LONG i
- conditions
- when not isType(REAL,n)
- s = "That's a string."
- break conditions
- when isType(INT,n) and n < 0
- s = "That's a negative number."
- break conditions
- when n = 0
- s = "You have entered zero."
- break conditions
- when not isType("WORD",n)
- s = "That's a fraction."
- break conditions
- else
- @result = 1
- step i from 1 to n
- @result = @result * i
- end step
- return @result
- end conditions
- return s & CRLF & "Please enter a positive integer."
- END iFactorial2
- enterPage
- That's a string.
- That's a negative number.
- That's a fraction.
- You have entered zero.
- Please enter a positive integer.
- iFactorial2
- TO GET iFactorial2 n
- ZREAL @result
- ZSTRING s
- ZLONG i
- xisType(
- s = "That's a
- 1INT,n)
- n < 0
- s = "
- 5negative
- n = 0
- s = "You have entered zero."
- "WORD",n)
- s = "
- fraction."
- s & CRLF & "Please
- a positive integer."
- keyDown
- TO HANDLE
- ZLONG i, cc
- k <> keyEnter
- = NULL
- cc =
- = SPACE
- R(i + 1)
- cc = cc - 1
- Removes Double Spaces.
- Type in the field below, then press Enter:
- enterPage
- NOTIFYAFTER
- TO GET iFactorial2 n
- local REAL @result
- local STRING s
- local LONG i
- conditions
- when not isType(REAL,n)
- s = "That's a string."
- break conditions
- when isType(INT,n) and n < 0
- s = "That's a negative number."
- break conditions
- when n = 0
- s = "You have entered zero."
- break conditions
- when not isType("WORD",n)
- s = "That's a fraction."
- break conditions
- else
- @result = 1
- step i from 1 to n
- @result = @result * i
- end step
- return @result
- end conditions
- return s & CRLF & "Please enter a positive integer."
- END iFactorial2
- enterPage
- Stage Page
- Stage Page
- *ClassTbl*
- *ClassEntry*
- *PTABLE*
- *WINDOWSEG*
- *ICONRESTAB*
- *ICONRESSEG*
- *ICONRES*
- Background
- *OBJTABLE*
- *IDTABLE*
- *NAMETAB*
- Rectangle
- Ellipse
- RoundedRectangle
- Polygon
- IrregularPolygon
- AngledLine
- Curve
- PaintObject
- Picture
- Group
- Stage
- Button
- Viewer
- ComboBox
- Field
- RecordField
- Hotword
- *RHOTWORD*
- *TbxBase*
- <BookPath>
- :HDMEDIAPATH
- System
- Arial
- Number of Colors Available
- Screen Resolution in Pixels
- enterPage
- TO HANDLE
- B"sr"
- = "Screen Resolution
- Pixels"
- B"mc"
- = "Number
- Colors Available"
- Number of Colors Available
- TB40WIN.DLL
- displayBitsPerPixel
- rpdisplayBitsPerPixel
- TB30WIN.DLL
- buttonClick
- TO HANDLE buttonClick
- ZLONG p
- linkDLL "TB40WIN.
- INT displayBitsPerPixel()
- p = 2 ^
- unLinkDLL "TB30WIN.
- = "Number
- Colors Available"
- Number of Colors Available
- enterPage
- button
- buttonDown
- NOTIFYBEFORE
- = NULL
- NOTIFYAFTER
- TO HANDLE buttonClick
- local LONG p
- linkDLL "TB40WIN.DLL"
- INT displayBitsPerPixel()
- end linkDLL
- p = 2 ^ displayBitsPerPixel()
- unLinkDLL "TB30WIN.DLL"
- caption of self = p
- pause 3 seconds
- caption of self = "Number of Colors Available"
- END buttonClicke 3 seconds
- caption of self = "Screen Resolution in Pixels"
- END buttonClick
- TB40WIN.DLL
- 9verticalDisplayRes
- Screen Resolution in Pixels
- TB30WIN.DLL
- horizontalDisplayRes
- verticalDisplayRes
- horizontalDisplayRes
- buttonClick
- TO HANDLE buttonClick
- ZPOINT p
- linkDLL "TB40WIN.
- horizontalDisplayRes()
- 3verticalDisplayRes()
- :es()
- unLinkDLL "TB30WIN.
- = "Screen Resolution
- Pixels"
- Screen Resolution in Pixels
- enterPage
- buttonDown
- TO HANDLE EnterPage
- 4LOGICAL scanning
- 4INT xs,ys
- 4DWORD hWnd
- --use the
- 4property sysPageUnitsPerPixel
- screen unit
- pixel conversions. You
- s also
- Uvarious
- --functions.
- --Assign
- _just
- avoid having
- so many
- %you enter
- handlers
- xs =
- ys =
- --Initialize
- " flag so that
- = FALSE
- --Establish
- path
- bitmap. In
- assumed
- same folder
- <> "\"
- --Open
- its display
- " &&
- & "stoats8.bmp alias bmp1 style" \
- && "child
- " && sysClientHandle && "wait")
- @ate maximized")
- ("status
- --Translate messages
- Windows operating
- OpenScript
- ToolBook
- translateWindowMessage
- on 513
- bDown
- --513
- sent on
- Bdown
- on 514
- --513
- --Forward
- so higher levels receive
- unTranslateAllWindowMessages
- imageCommand("close
- 4POINT location
- --This
- called
- translated
- 513.
- --It sets "
- " so
- scroller operates
- establishes
- initial mouse
- = TRUE
- = mousePosition
- 513.
- --It resets "
- " so
- does
- will
- appropriate
- --cursor
- resume.
- !(hourglass)
- bmpOffset
- bmpSlop
- bmpLoc,newPos,currentLoc
- handled.
- without processing
- o<> 44
- o= 44
- a repeating
- , so prevent flicker
- --slowdown
- Hsetting
- only
- needed. Use the
- --four-pointed
- indicate
- available:
- o<> 7
- how much
- has been moved since
- It -
- It -
- amount
- motion
- --Each
- , which represent width
- height,
- --are computed
- full
- subtracted so
- picture doesn't
- --offscreen,
- each
- multiplied
- twips per
- . However, no stretching
- shrinking
- --actually occurs
- resolution
- where
- ource
- It - 640) * xs
- It - 480) * ys
- --pixels
- = curLoc()
- --Calculate
- V points
- --stop because
- { edge
- meets the
- ) <= 0 \
- ) <= 0 \
- ) > \
- ) > \
- --Update
- account
- a placeholder
- TO GET
- z = (
- It) * xs
- z = (
- It) * ys
- TO SET
- )/xs & "," \
- )/ys && "
-