The fileOpen function attempts to create or open a file with the specified filename {filename} and type {type} indicated. If no filename is specified, the host will allow the user to select the file.


The fileOpen function opens an existing file or creates a new file and opens it.




(fileOpen filename mode type)

Arguments Name Type Description
Argument:filename Text String Optional argument. The name of the file to be opened. This name may include a full path specification. Note: On some host systems, if the file name is #void or missing, a user dialog box appears allowing the user to choose the file.
Argument:modeInteger The mode switch. A value of: (0) requests that only an existing file be opened; (1) indicates that a new file will be created. If a file already exists with this name, it will be destroyed and a new virgin file will be created; (2) valid for database files only, indicates that an existing database file be opened for read only transactions shared with other users.
Argument:type Integer The file type switch. (0) requests that a text file be opened; (1) requests that a Spreadsheet binary file be opened;(2) requests that a Smarttable binary file be opened; (3) requests that a Workspace binary file be opened; (4) requests that an Object binary file be opened; (5) requests that an Object Database file be opened.


An Integer file identifier, fileID, is returned.



Here are a number of links to Lambda coding examples which contain this instruction in various use cases.


Argument Types

Here are the links to the data types of the function arguments.

ByteVector Text Integer Boolean

Here are also a number of links to functions having arguments with any of these data types.

++ += + /=
/ * -- -=
- abortTransaction addMethod addi
appendWriteln avg badd balance
bcompareEQ bcompareGE bcompareGT bcompareLE
bcompareLT bcompareNE bdiv beginTransaction
binaryInsert binaryNand binaryNor binaryNot
binaryNxor binarySearch bitwiseAnd bitwiseNand
bitwiseNor bitwiseNot bitwiseNxor bitwiseOr
bitwiseShiftLeft bitwiseShiftRight bitwiseXor bmod
bmul boolean cadd ccompareEQ
ccompareGE ccompareGT ccompareLE ccompareLT
ccompareNE cdiv char character
checkPointTransaction clean clear cmod
cmul code commitTransaction compareEQ
compareGE compareGT compareLE compareLT
compareNE compare comparison compile
compress cons count csub
day days360 debugDetective debug
decode deleteRows delete dimension
disassemble display divi downcase
encode evalInSyncLocalContext exit exportCsv
exportSbf exportTab fact fdisplay
fileClose fileCopy fileDir fileDisplay
fileEraseDir fileErase fileExists fileMakeDir
fileOpen fileReadAll fileReadRecord fileRead
fileResize fileSeek fileSizeOf fileWriteAll
fileWrite filewriteln findBlock find
floor fraction freeBlock gc
gcd getRecursionCount hashString hour
iadd icompareEQ icompareGE icompareGT
icompareLE icompareLT icompareNE idiv
imod importCsv importSbf importTab
imul insertRows insert inside
inspect integer isAtom isBitVector
isBoolean isBound isByteVector isCharAlphabetic
isCharAlphanumeric isCharLowercase isCharName isCharNumeric
isCharUppercase isCharWhitespace isChar isCharacter
isComplex isDate isDictionary isDirectory
isEqual isError isEven isExact
isFloatVector isIdentical isImmediate isInexact
isInside isIntegerVector isInteger isLambda
isMatrix isMember isMoney isNegative
isNull isNumberMatrix isNumberVector isNumber
isObjectVector isObject isOdd isPair
isPcodeVector isPositive isString isStructure
isSymbol isText isTransaction isType
isVector isZero isub kurtosis
lcm left length lisp
list loadModule loadObject loadWorkspace
logConsole macroReplace makeQuotedList makeQuotedSymbol
max median member mid
min minute mod modi
money month morph muli
ncompareEQ ncompareGE ncompareGT ncompareLE
ncompareLT ncompareNE new number
objectToMatrix objectToNumMatrix objectToNumVector offset
onError pair parent parse
pointer preAllocateFixedMemoryBlocks product qt
quit random randomize range
rank refAttributes refValues ref
remove rename replace rept
reset resize right round
run saveModule saveObject saveRepository
saveWorkspace second setAttributes setBlock
setCar setCdr setLastCdr set
setf setq sizeof skew
sort sql sqrt srandom
stdev stdevp stringCiEQ stringCiGE
stringCiGT stringCiLE stringCiLT stringCiNE
stringFill stringToBVector stringToVector string
subi substitute substringCiEQ substringCiGE
substringCiGT substringCiLE substringCiLT substringCiNE
substringEQ substringFill substringGE substringGT
substringLE substringLT substringNE substring
sum sumsqr svmRegression symbolToTypeCode
symbol systemCheck system text
time trim type uncompress
uniqueInsert upcase var varp
vectorBinaryInnerProduct vectorBipolarInnerProduct vectorCosineInnerProduct vectorCubeInnerProduct
vectorDelete vectorExpInnerProduct vectorFill vectorInnerProduct
vectorLogInnerProduct vectorQuartInnerProduct vectorQuintInnerProduct vectorSigmoidInnerProduct
vectorSineInnerProduct vectorSquareInnerProduct vectorTanInnerProduct vectorTanhInnerProduct
version writelg writeln year

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE