write.AmigaBasic: Write an AmigaBasic object to a file

View source: R/basic.r

write.AmigaBasicR Documentation

Write an AmigaBasic object to a file

Description

Write an AmigaBasic() class object to a file in its binary format.

Usage

write.AmigaBasic(x, file, disk = NULL)

Arguments

x

The AmigaBasic() class object that needs to be stored.

file

A character string specifying the file location to which x (an AmigaBasic() object) needs to be written.

disk

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

Details

This function encodes the Amiga Basic code in its binary format (using as.raw()) and writes it to a file. The file can also be stored onto a virtual Amiga disk (amigaDisk()).

Value

Invisibly returns the result of the call of close to the file connection. Or, when disk is specified, a copy of disk is returned to which the file(s) is/are written.

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(), read.AmigaBasic()

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

Examples

## Not run: 
## First create an AmigaBasic object:
bas <- as.AmigaBasic("PRINT \"hello world!\"")

## write to tempdir:
write.AmigaBasic(bas, file.path(tempdir(), "helloworld.bas"))

## End(Not run)

AmigaFFH documentation built on June 22, 2024, 11:03 a.m.