Skip to content

Resource Image Name Option

Obsolete

This command is obsolete. It is a legacy command intended for use in character-mode DataFlex.

This command does not work on embedded resources like bitmaps, icons, and version information that is compiled into a DataFlex application. See Resources for embedding these types of resources into your application.

See Also

Purpose

To embed sequential data in a program as a line-delimited resource instead of a display image.

Note

This command is a character-mode legacy command that handles embedding of files as resources. It does not work on embedded resources like bitmaps, icons, and version information that is compiled into a DataFlex application. See Resources for embedding these types of resources.

Syntax

/
resourceName
resource
:
/*

Argument Explanation

  • resourceName: The name of the resource to be embedded in the program.

What It Does

The Resource command causes the text that follows the name line to be embedded as a resource instead of including the image as an image for data entry or for report output. (None of the standard image-oriented symbols are defined for a resource.) The name of the resource is the image name. The resource can be treated as a sequential file in all respects; i.e., the direct_input command is used to open a resource just like any other sequential file.

You may not specify the resident or help image name options for resource images. However, you may specify the resident: option in a direct_input statement when opening the resource for sequential input.

A resource ID is also defined for the resource based on the resourceName plus a suffix of .RSC—a resource named account_default has a resource ID defined as account_defaults.rsc. This resource ID is a constant Integer value that can be used at runtime to refer to a resource dynamically. The direct_input and get_resource_type commands support the use of resource names directly in their syntax; any other reference to a resource must use the resource ID (or its integer value).

The type of a resource is defined during compilation and cannot be reset at runtime. Resources defined using the resource image option use a resource type of DF_RESOURCE_TYPE_LINE. The get_resource_type command is used to determine the type of a resource.

In cases where you need to refer to a resource in source code prior to the point where the resource is included, you can use the register_resource command to cause the resource name and resource ID to be defined.

The bottom border line may contain the name of the next resource to be designed or, if it is desired to begin program code, the bottom border line may contain only an asterisk after the diagonal (/*).