Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/load-stock

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

USAGE: LOAD-STOCK name /block size DESCRIPTION: Load and return stock image. (Keep cache after first load) LOAD-STOCK is a function value. ARGUMENTS: name -- (Type: any) REFINEMENTS: /block size -- (Type: any) SOURCE CODE load-stock: func [ {Load and return stock image. (Keep cache after first load)} name /block size /local image ][ if not image: find system/view/vid/image-stock name [ make error! reform ["Image not in stock:" name] ] either block [ block: copy [] loop size [ if not image? second image [change next image load second image] append block second image image: skip image 3 ] return block ] [ if not image? second image [change next image load second image] return second image ] ]