| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.TI85.File.Variable
Description
This module defines the structure of a TI-85 variable file.
Synopsis
- data TIVar = TIVar {
- varOffset :: Word16
- varLen :: Word16
- varId :: Word8
- varNameLen :: Word8
- varName :: ByteString
- varDataLen :: Word16
- varData :: ByteString
- newtype TIVarData = TIVarData {}
- data VarField
- data VarType
- = VarUnknown
- | VarValue VarField
- | VarVector VarField
- | VarList VarField
- | VarMatrix VarField
- | VarConstant VarField
- | VarEquation
- | VarString
- | VarGDBFunc
- | VarGDBPolar
- | VarGDBParam
- | VarGDBDiff
- | VarPicture
- | VarProgram
- | VarDirectory
- | VarSettingsFunc
- | VarSettingsPolar
- | VarSettingsParam
- | VarSettingsDiff
- | VarSavedWinSize
- | VarMemory
- idToType :: Word8 -> VarType
- typeToId :: VarType -> Word8
- showType :: VarType -> Text
Types
The structure of a single variable.
For the meaning of variable IDs, see idToType.
Constructors
| TIVar | |
Fields
| |
The contents of a variable file (minus standard header and checksum).
Scalar values can either be real or complex. Likewise, vectors, lists, etc can contain values of either.
Constructors
| VarReal | |
| VarComplex |
Possible variable types.
See also Variable.
Constructors
Utilities
idToType :: Word8 -> VarType Source #
Convert the variable ID word from a variable file into its type. From https://www.ticalc.org/pub/text/calcinfo/ti86prot.txt:
| Type ID | Description |
|---|---|
| 00 | Real Number |
| 01 | Complex Number |
| 02 | Real Vector |
| 03 | Complex Vector |
| 04 | Real List |
| 05 | Complex List |
| 06 | Real Matrix |
| 07 | Complex Matrix |
| 08 | Real Constant |
| 09 | Complex Constant |
| 0A | Equation |
| 0C | String |
| 0D | Function GDB |
| 0E | Polar GDB |
| 0F | Parametric GDB |
| 10 | Differential Equation GDB |
| 11 | Picture |
| 12 | Program |
| 15 | Directory (only used when requesting dir) |
| 17 | Function Window Settings |
| 18 | Polar Window Settings |
| 19 | Parametric Window Settings |
| 1A | Differential Equation Window Settings |
| 1B | Saved Window Size (ZRCL) |
| 1D | Memory backup |
| 1E | Unknown (only used when requesting var) |