A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
1
Task/Include-a-file/0DESCRIPTION
Normal file
1
Task/Include-a-file/0DESCRIPTION
Normal file
|
|
@ -0,0 +1 @@
|
|||
The task is to demonstrate the language's ability to include source code from other files.
|
||||
1
Task/Include-a-file/ACL2/include-a-file-1.acl2
Normal file
1
Task/Include-a-file/ACL2/include-a-file-1.acl2
Normal file
|
|
@ -0,0 +1 @@
|
|||
(include-book "filename")
|
||||
1
Task/Include-a-file/ACL2/include-a-file-2.acl2
Normal file
1
Task/Include-a-file/ACL2/include-a-file-2.acl2
Normal file
|
|
@ -0,0 +1 @@
|
|||
(ld "filename.lisp")
|
||||
1
Task/Include-a-file/AWK/include-a-file-1.awk
Normal file
1
Task/Include-a-file/AWK/include-a-file-1.awk
Normal file
|
|
@ -0,0 +1 @@
|
|||
awk -f one.awk -f two.awk
|
||||
9
Task/Include-a-file/AWK/include-a-file-2.awk
Normal file
9
Task/Include-a-file/AWK/include-a-file-2.awk
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# one.awk
|
||||
BEGIN {
|
||||
sayhello()
|
||||
}
|
||||
|
||||
# two.awk
|
||||
function sayhello() {
|
||||
print "Hello world"
|
||||
}
|
||||
7
Task/Include-a-file/Ada/include-a-file.ada
Normal file
7
Task/Include-a-file/Ada/include-a-file.ada
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
with Ada.Text_IO, Another_Package; use Ada.Text_IO;
|
||||
-- the with-clause tells the compiler to include the Text_IO package from the Ada standard
|
||||
-- and Another_Package. Subprograms from these packages may be called as follows:
|
||||
-- Ada.Text_IO.Put_Line("some text");
|
||||
-- Another_Package.Do_Something("some text");
|
||||
-- The use-clause allows the program author to write a subprogram call shortly as
|
||||
-- Put_Line("some text");
|
||||
2
Task/Include-a-file/AutoHotkey/include-a-file.ahk
Normal file
2
Task/Include-a-file/AutoHotkey/include-a-file.ahk
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#Include FileOrDirName
|
||||
#IncludeAgain FileOrDirName
|
||||
1
Task/Include-a-file/BBC-BASIC/include-a-file.bbc
Normal file
1
Task/Include-a-file/BBC-BASIC/include-a-file.bbc
Normal file
|
|
@ -0,0 +1 @@
|
|||
CALL filepath$
|
||||
4
Task/Include-a-file/C-sharp/include-a-file.cs
Normal file
4
Task/Include-a-file/C-sharp/include-a-file.cs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/* The C# language specification does not give a mechanism for 'including' one source file within another,
|
||||
* likely because there is no need - all code compiled within one 'assembly' (individual IDE projects
|
||||
* are usually compiled to separate assemblies) can 'see' all other code within that assembly.
|
||||
*/
|
||||
5
Task/Include-a-file/C/include-a-file.c
Normal file
5
Task/Include-a-file/C/include-a-file.c
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* Standard library header names are enclosed using chevron enclosures */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* User library header names are enclosed using doublequotes */
|
||||
#include "mylib.h"
|
||||
1
Task/Include-a-file/D/include-a-file-1.d
Normal file
1
Task/Include-a-file/D/include-a-file-1.d
Normal file
|
|
@ -0,0 +1 @@
|
|||
import std.stdio;
|
||||
1
Task/Include-a-file/D/include-a-file-2.d
Normal file
1
Task/Include-a-file/D/include-a-file-2.d
Normal file
|
|
@ -0,0 +1 @@
|
|||
mixin(import("code.txt"));
|
||||
5
Task/Include-a-file/DWScript/include-a-file.dwscript
Normal file
5
Task/Include-a-file/DWScript/include-a-file.dwscript
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{$INCLUDE Common} // Inserts the contents of Common.pas into the current unit
|
||||
{$I Common} // Same as the previous line, but in a shorter form
|
||||
{$INCLUDE_ONCE Common} // Inserts the contents of Common.pas into the current unit only if not included already
|
||||
{$FILTER Common} // Inserts the contents of Common.pas into the current unit after filtering
|
||||
{$F Common} // Same as the previous line, but in a shorter form
|
||||
4
Task/Include-a-file/Delphi/include-a-file.delphi
Normal file
4
Task/Include-a-file/Delphi/include-a-file.delphi
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
uses SysUtils; // Lets you use the contents of SysUtils.pas from the current unit
|
||||
|
||||
{$Include Common} // Inserts the contents of Common.pas into the current unit
|
||||
{$I Common} // Same as the previous line, but in a shorter form
|
||||
1
Task/Include-a-file/Erlang/include-a-file.erl
Normal file
1
Task/Include-a-file/Erlang/include-a-file.erl
Normal file
|
|
@ -0,0 +1 @@
|
|||
-include("my_header.hrl"). % Includes the file at my_header.erl
|
||||
1
Task/Include-a-file/Forth/include-a-file.fth
Normal file
1
Task/Include-a-file/Forth/include-a-file.fth
Normal file
|
|
@ -0,0 +1 @@
|
|||
include matrix.fs
|
||||
1
Task/Include-a-file/Fortran/include-a-file.f
Normal file
1
Task/Include-a-file/Fortran/include-a-file.f
Normal file
|
|
@ -0,0 +1 @@
|
|||
include ''char-literal-constant''
|
||||
1
Task/Include-a-file/GAP/include-a-file.gap
Normal file
1
Task/Include-a-file/GAP/include-a-file.gap
Normal file
|
|
@ -0,0 +1 @@
|
|||
Read("file");
|
||||
7
Task/Include-a-file/Haskell/include-a-file.hs
Normal file
7
Task/Include-a-file/Haskell/include-a-file.hs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Due to Haskell's module system, textual includes are rarely needed. In
|
||||
-- general, one will import a module, like so:
|
||||
import SomeModule
|
||||
-- For actual textual inclusion, alternate methods are available. The Glasgow
|
||||
-- Haskell Compiler runs the C preprocessor on source code, so #include may be
|
||||
-- used:
|
||||
#include "SomeModule.hs"
|
||||
1
Task/Include-a-file/Icon/include-a-file.icon
Normal file
1
Task/Include-a-file/Icon/include-a-file.icon
Normal file
|
|
@ -0,0 +1 @@
|
|||
$include "filename.icn"
|
||||
1
Task/Include-a-file/J/include-a-file-1.j
Normal file
1
Task/Include-a-file/J/include-a-file-1.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
require 'myheader.ijs'
|
||||
1
Task/Include-a-file/J/include-a-file-2.j
Normal file
1
Task/Include-a-file/J/include-a-file-2.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
load 'myheader.ijs'
|
||||
6
Task/Include-a-file/JavaScript/include-a-file-1.js
Normal file
6
Task/Include-a-file/JavaScript/include-a-file-1.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
var s = document.createElement('script');
|
||||
s.type = 'application/javascript';
|
||||
|
||||
// path to the desired file
|
||||
s.src = 'http://code.jquery.com/jquery-1.6.2.js';
|
||||
document.body.appendChild(s);
|
||||
1
Task/Include-a-file/JavaScript/include-a-file-2.js
Normal file
1
Task/Include-a-file/JavaScript/include-a-file-2.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
$.getScript("http://example.com/script.js");
|
||||
1
Task/Include-a-file/Lua/include-a-file.lua
Normal file
1
Task/Include-a-file/Lua/include-a-file.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require "myheader"
|
||||
1
Task/Include-a-file/Maple/include-a-file-1.maple
Normal file
1
Task/Include-a-file/Maple/include-a-file-1.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
$include <somefile>
|
||||
1
Task/Include-a-file/Maple/include-a-file-2.maple
Normal file
1
Task/Include-a-file/Maple/include-a-file-2.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
$include "somefile"
|
||||
1
Task/Include-a-file/Maple/include-a-file-3.maple
Normal file
1
Task/Include-a-file/Maple/include-a-file-3.maple
Normal file
|
|
@ -0,0 +1 @@
|
|||
read "somefile":
|
||||
|
|
@ -0,0 +1 @@
|
|||
Get["myfile.m"]
|
||||
4
Task/Include-a-file/Maxima/include-a-file.maxima
Normal file
4
Task/Include-a-file/Maxima/include-a-file.maxima
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
load("c:/.../source.mac")$
|
||||
|
||||
/* or if source.mac is in Maxima search path (see ??file_search_maxima), simply */
|
||||
load(source)$
|
||||
1
Task/Include-a-file/Modula-2/include-a-file.mod2
Normal file
1
Task/Include-a-file/Modula-2/include-a-file.mod2
Normal file
|
|
@ -0,0 +1 @@
|
|||
IMPORT InOut, NumConv, Strings;
|
||||
1
Task/Include-a-file/PHP/include-a-file-1.php
Normal file
1
Task/Include-a-file/PHP/include-a-file-1.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
include("file.php")
|
||||
1
Task/Include-a-file/PHP/include-a-file-2.php
Normal file
1
Task/Include-a-file/PHP/include-a-file-2.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
include_once("file.php")
|
||||
1
Task/Include-a-file/PHP/include-a-file-3.php
Normal file
1
Task/Include-a-file/PHP/include-a-file-3.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("file.php")
|
||||
1
Task/Include-a-file/PHP/include-a-file-4.php
Normal file
1
Task/Include-a-file/PHP/include-a-file-4.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
require_once("file.php")
|
||||
3
Task/Include-a-file/Perl/include-a-file-1.pl
Normal file
3
Task/Include-a-file/Perl/include-a-file-1.pl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/perl
|
||||
do "include.pl"; # Utilize source from another file
|
||||
sayhello();
|
||||
3
Task/Include-a-file/Perl/include-a-file-2.pl
Normal file
3
Task/Include-a-file/Perl/include-a-file-2.pl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
sub sayhello {
|
||||
print "Hello World!";
|
||||
}
|
||||
1
Task/Include-a-file/PicoLisp/include-a-file.l
Normal file
1
Task/Include-a-file/PicoLisp/include-a-file.l
Normal file
|
|
@ -0,0 +1 @@
|
|||
(load "file1.l" "file2.l" "file3.l")
|
||||
1
Task/Include-a-file/Prolog/include-a-file.pro
Normal file
1
Task/Include-a-file/Prolog/include-a-file.pro
Normal file
|
|
@ -0,0 +1 @@
|
|||
consult('filename').
|
||||
1
Task/Include-a-file/Python/include-a-file-1.py
Normal file
1
Task/Include-a-file/Python/include-a-file-1.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
import mymodule
|
||||
1
Task/Include-a-file/Python/include-a-file-2.py
Normal file
1
Task/Include-a-file/Python/include-a-file-2.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
mymodule.variable
|
||||
1
Task/Include-a-file/R/include-a-file.r
Normal file
1
Task/Include-a-file/R/include-a-file.r
Normal file
|
|
@ -0,0 +1 @@
|
|||
source("filename.R")
|
||||
2
Task/Include-a-file/Racket/include-a-file.rkt
Normal file
2
Task/Include-a-file/Racket/include-a-file.rkt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#lang racket
|
||||
(include "other-file.rkt")
|
||||
1
Task/Include-a-file/Ruby/include-a-file.rb
Normal file
1
Task/Include-a-file/Ruby/include-a-file.rb
Normal file
|
|
@ -0,0 +1 @@
|
|||
require 'file'
|
||||
1
Task/Include-a-file/Smalltalk/include-a-file-1.st
Normal file
1
Task/Include-a-file/Smalltalk/include-a-file-1.st
Normal file
|
|
@ -0,0 +1 @@
|
|||
aFilename asFilename readStream fileIn
|
||||
1
Task/Include-a-file/Smalltalk/include-a-file-2.st
Normal file
1
Task/Include-a-file/Smalltalk/include-a-file-2.st
Normal file
|
|
@ -0,0 +1 @@
|
|||
Smalltalk fileIn: aFilename
|
||||
1
Task/Include-a-file/Tcl/include-a-file-1.tcl
Normal file
1
Task/Include-a-file/Tcl/include-a-file-1.tcl
Normal file
|
|
@ -0,0 +1 @@
|
|||
source "foobar.tcl"
|
||||
1
Task/Include-a-file/Tcl/include-a-file-2.tcl
Normal file
1
Task/Include-a-file/Tcl/include-a-file-2.tcl
Normal file
|
|
@ -0,0 +1 @@
|
|||
package require foobar 1.3
|
||||
Loading…
Add table
Add a link
Reference in a new issue