Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1 @@
GetCalc("appvOUTPUT",0)

View file

@ -0,0 +1,2 @@
FileIO text;
text.open("output.txt", FileIO.WRITE);

View file

@ -0,0 +1,14 @@
PROGRAM FILE_TEST
!$INCLUDE="PC.LIB"
BEGIN
OPEN("O",#1,"output.txt")
CLOSE(1)
OS_MKDIR("C:\RC") ! with the appropriate access rights .......
OPEN("O",#1,"C:\RC\output.txt")
CLOSE(1)
END PROGRAM

View file

@ -0,0 +1,15 @@
;; The file system is the browser local storage
;; It is divided into named stores (directories)
;; "user" is the default (home) store
; before : list of stores
(local-stores) → ("system" "user" "words" "reader" "info" "root")
(local-put-value "output.txt" "") → "output.txt" ; into "user"
(local-make-store "user/docs") → "user/docs"
(local-put-value "output.txt" "" "root") → "output.txt" ; into "root"
(local-make-store 'root/docs) → "root/docs"
; after : list of stores
(local-stores 'root) → ("root" "root/docs")
(local-stores 'user) → ("user" "user/docs")

View file

@ -0,0 +1,15 @@
' FB 1.05.0 Win64
' create empty file and sub-directory in current directory
Open "output.txt" For Output As #1
Close #1
MkDir "docs"
' create empty file and sub-directory in root directory c:\
' creating file in root requires administrative privileges in Windows 10
Open "c:\output.txt" For Output As #1
Close #1
MkDir "c:\docs"
Print "Press any key to quit"
Sleep

View file

@ -0,0 +1,6 @@
import io.File
File( 'output.txt' ).createNewFile()
File( File.separator + 'output.txt' ).createNewFile()
File( 'docs' ).mkdir()
File( File.separator + 'docs' ).mkdir()

View file

@ -0,0 +1,17 @@
function create( ""filename ) {
! var file = open(filename)
file("")
issues {
print("Failed to create "+filename)
return
}
print(filename+" created!")
close(file)
}
software {
create("output.txt")
create("docs/")
create("/output.txt")
create("/docs/")
}

View file

@ -0,0 +1,4 @@
(: file write_file '"output.txt" '"Some data")
(: file make_dir '"docs")
(: file write_file '"/output.txt" '"Some data")
(: file make_dir '"/docs")

View file

@ -0,0 +1,17 @@
// create file
local(f) = file
handle => { #f->close }
#f->openWriteOnly('output.txt')
// make directory, just like a file
local(d = dir('docs'))
#d->create
// create file in root file system (requires permissions at user OS level)
local(f) = file
handle => { #f->close }
#f->openWriteOnly('//output.txt')
// create directory in root file system (requires permissions at user OS level)
local(d = dir('//docs'))
#d->create

View file

@ -0,0 +1,3 @@
-- note: fileIO xtra is shipped with Director, i.e. an "internal"
fp = xtra("fileIO").new()
fp.createFile("output.txt")

View file

@ -0,0 +1,6 @@
-- note: fileIO xtra is shipped with Director, i.e. an "internal"
pd = the last char of _movie.path -- "\" for win, ":" for mac
_player.itemDelimiter = pd
vol = _movie.path.item[1]
fp = xtra("fileIO").new()
fp.createFile(vol&pd&"output.txt")

View file

@ -0,0 +1,3 @@
shell_cmd("mkdir Docs") -- in cwd, both win and mac
shell_cmd("mkdir \Docs") -- win
shell_cmd("mkdir /Docs") -- mac

View file

@ -0,0 +1,7 @@
import os
open("output.txt", fmWrite).close()
createDir("docs")
open(DirSep & "output.txt", fmWrite).close()
createDir(DirSep & "docs")

View file

@ -0,0 +1,5 @@
import os
const directories = ["/", "./"]
for directory in directories:
open(directory & "output.txt", fmWrite).close()
createDir(directory & "docs")

View file

@ -0,0 +1,15 @@
integer fn
-- In the current working directory
system("mkdir docs",2)
fn = open("output.txt","w")
close(fn)
-- In the filesystem root
system("mkdir \\docs",2)
fn = open("\\output.txt","w")
if fn=-1 then
puts(1,"unable to create \\output.txt\n")
else
close(fn)
end if

View file

@ -0,0 +1,4 @@
system("mkdir C:\Ring\docs")
fopen("C:\Ring\docs\output.txt", "w+")
system("mkdir docs")
fopen("output.txt", "w+")

View file

@ -0,0 +1,7 @@
# Here
%f'output.txt' -> create;
%d'docs' -> create;
# Root dir
Dir.root + %f'output.txt' -> create;
Dir.root + %d'docs' -> create;

View file

@ -0,0 +1,7 @@
decl file f
f.create "output.txt"
f.createdir "docs"
# in the root directory
f.create "/output.txt"
f.createdir "/docs"