Coerce raw or character data to an AmigaBasic()
S3 class object
Arguments
- x
x
should be avector
ofraw
data orcharacter
strings. Whenx
israw
data, it is interpreted as if it where from an Amiga Basic binary encoded file.When
x
is avector
ofcharacter
strings, each element of the vector should represent one line of Basic code. Each line should not contain line break or other special characters, as this will result in errors. The text should represent valid Amiga Basic syntax. The syntax is only checked to a limited extent as this package does not implement an interpreter for the code.- ...
Currently ignored.
Value
Returns an AmigaBasic()
class object based on x
.
Details
Convert text to an AmigaBasic()
S3 class object. The text should
consist of valid Amiga BASIC syntaxis. This function does not perform a
full check of the syntaxis, but will break on some fundamental syntaxis malformations
See also
Other AmigaBasic.operations:
AmigaBasic.reserved()
,
AmigaBasicBMAP
,
AmigaBasic
,
[.AmigaBasic()
,
as.AmigaBasicBMAP()
,
as.character()
,
check.names.AmigaBasic()
,
names.AmigaBasic()
,
rawToAmigaBasicBMAP()
,
rawToAmigaBasic()
,
read.AmigaBasicBMAP()
,
read.AmigaBasic()
,
write.AmigaBasic()
Other raw.operations:
as.raw.AmigaBasic()
,
colourToAmigaRaw()
,
packBitmap()
,
rawToAmigaBasicBMAP()
,
rawToAmigaBasicShape()
,
rawToAmigaBasic()
,
rawToAmigaBitmapFontSet()
,
rawToAmigaBitmapFont()
,
rawToAmigaIcon()
,
rawToHWSprite()
,
rawToIFFChunk()
,
rawToSysConfig()
,
simpleAmigaIcon()
Examples
if (FALSE) {
## An AmigaBasic object can be created from text.
## Note that each line of code is a seperate element
## in the vector:
bas <- as.AmigaBasic(c(
"CLS ' Clear the screen",
"PRINT \"Hello world!\" ' Print a message on the screen"
))
## Let's make it raw data:
bas.raw <- as.raw(bas)
## We can also use the raw data to create an Amiga Basic object:
## Note that this effectively the same as calling 'rawToAmigaBasic'
bas <- as.AmigaBasic(bas.raw)
}