Jump to content

File size: Difference between revisions

no edit summary
m (Add libheader to the lang example)
No edit summary
Line 1,014:
return filesize
end</syntaxhighlight>
 
=={{header|M2000 Interpreter}}==
Version 12 can convert numbers to string if a string exist in expression. Functions or arithmetic expressions must be in parenthesis (see filelen()). Older versions has to use ; (for print only):
<syntaxhighlight lang="m2000 interpreter">
print filename+" has size ";filelen(filename);" bytes"
</syntaxhighlight>
 
<syntaxhighlight lang="m2000 interpreter">
Module ShowFileSize(filename as string) {
if exist(filename) then
print filename+" has size "+(filelen(filename))+" bytes"
else
print filename+ " not exist"
end if
}
ShowFileSize "checkthis.txt"
</syntaxhighlight>
 
=={{header|Maple}}==
404

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.