User Tools


reference:file_specifications

File Specifications

File Specification Method

A file can be specified by a combination of file type and file name.

[FileType:]FileName

If the file types are different, you can create a file with the same file name. They are treated as different files.

FileName

The file name can be up to 32 characters. Available characters are numbers, letters, _ (underscore), - (hyphen), . (Period).

・Letters are not case sensitive.

・. (Period) cannot be used at the beginning of the file name.

FileType

The files handled by SmileBASIC4 are roughly divided into text data, numerical data and graphic data.

If the command reference includes "FileType", select from the following four type names.

If the file type is not specified, it is treated as text data if there is no additional description in the command reference.

TXT Text Data
DAT Numeric Data
GRP Graphic Data
JPG Graphic data (Lossy Compression)

Projects

SmileBASIC4 has a mechanism called "Project" in order to divide the storage location for each work.

When running a program in a project, only files in the same project can be manipulated, with some exceptions.

Therefore, you don't have to worry about whether other projects have the same type and file name.

・The project that contains the currently running program is called the current project.

・The current project can be moved with the PROJECT command only in the direct mode. The current project cannot be changed from within the program.

・Project names start with '#' are called system projects.

・EXEC in the program can be executed for files in the current project and system project.

・SAVE in the program can be executed for files in the current project.

・For tool programs, EXEC and SAVE can be executed for any projects other than the system project.

・In the initial state, the workspace project is the current project. Workspace project cannot be deleted or renamed.

・If PROJECT "" is specified, you have specified a workspace project.

・When specifying the file name including the project name, it will be "ProjectName/FileName". If you specify "/FileName", you have specified a workspace project.

・The naming rule of the project name is the same as the file name.

Multi-Programs

SmileBASIC4 has four program slots and can load up to four programs simultaneously. The relationship between the programs loaded in the program slot is as follows.

・Name spaces between program slots are separated. In other words, global variables, labels, user-defined statements, and constants defined in a program slot cannot be referenced from other program slots without doing anything.

・By using the COMMON keyword, you can define user-defined statements that can be shared between programs.

・Program execution is handled separately. That is, when you RUN program slot 0, execution stops at the end of program slot 0. It does not continue to execute program slot 1.

・There are three ways to transfer control to other programs: using EXEC, using GOTO/GOSUB/CALL runtime label references, and calling user-defined statements with the COMMON keyword.

・A program can be loaded into another program slot during program execution. When it's loaded, the program variables, labels, and user-defined statements that originally existed in the program slot will be released.

・You cannot load a different program yourself into a running program slot.

reference/file_specifications.txt · Last modified: 2020/08/24 12:17 (external edit)

Page Tools