Class resource forms and interface to access data needed to get a running application that is not easily expressed in the programs source-code. Examples are graphics file, help-files, etc.
The following example declares and uses a resource
object to access the bitmap’pce.bm’from
the standard bitmap library:
resource(pce, image, image('pce.bm')).
...
new(I, image(resource(pce, image))),
...
The resource/3
clause is used by the runtime-generation system to attach the image to
the runtime executable. Class resource
is used by image->load
to access the resource-data, forming the proper image
object.
image. See also resource<-context.-context-name
is obligatory. See also resource<-class
.and resource<-context.
read,
and resource->exists
succeeds. See also file->access.->access.<-name
and resource<-class.
<-convert.