read.AmigaBasic: Read Amiga Basic files

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/basic.r

Description

Read an AmigaBasic script from its binary format.

Usage

1

Arguments

file

A character string of the filename of the Amiga Basic file to be read.

disk

A virtual Commodore Amiga disk from which the file should be read. This should be an amigaDisk object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored.

...

Currently ignored

Details

Normally Amiga Basic code is stored encoded in a binary format (rawToAmigaBasic). This function reads the binary data from a file (which can be stored on a virtual disk (amigaDisk)) and converts in into an AmigaBasic class objec.

Value

Returns an AmigaBasic class object read from the file.

Author(s)

Pepijn de Vries

See Also

Other AmigaBasic.operations: AmigaBasic.reserved(), AmigaBasicBMAP, AmigaBasic, [.AmigaBasic(), as.AmigaBasicBMAP(), as.AmigaBasic(), as.character(), check.names.AmigaBasic(), names.AmigaBasic(), rawToAmigaBasicBMAP(), rawToAmigaBasic(), read.AmigaBasicBMAP(), write.AmigaBasic()

Other io.operations: read.AmigaBasicBMAP(), read.AmigaBasicShape(), read.AmigaBitmapFontSet(), read.AmigaBitmapFont(), read.AmigaIcon(), read.SysConfig(), read.iff(), write.AmigaBasicShape(), write.AmigaBasic(), write.AmigaBitmapFont(), write.AmigaIcon(), write.SysConfig(), write.iff()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
## First create an AmigaBasic file
write.AmigaBasic(as.AmigaBasic("PRINT \"Hello world\""),
                 file.path(tempdir(), "helloworld.bas"))

## Now let's read the same file:
bas <- read.AmigaBasic(file.path(tempdir(), "helloworld.bas"))

## End(Not run)

## There's also a demo file included with the package
demo.bas <- read.AmigaBasic(system.file("demo.bas", package = "AmigaFFH"))
demo.bas

AmigaFFH documentation built on Sept. 5, 2021, 5:22 p.m.