This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1 @@
The task is to demonstrate the language's ability to include source code from other files.

View file

@ -0,0 +1 @@
(include-book "filename")

View file

@ -0,0 +1 @@
(ld "filename.lisp")

View file

@ -0,0 +1 @@
awk -f one.awk -f two.awk

View file

@ -0,0 +1,9 @@
# one.awk
BEGIN {
sayhello()
}
# two.awk
function sayhello() {
print "Hello world"
}

View 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");

View file

@ -0,0 +1,2 @@
#Include FileOrDirName
#IncludeAgain FileOrDirName

View file

@ -0,0 +1 @@
CALL filepath$

View 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.
*/

View 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"

View file

@ -0,0 +1 @@
import std.stdio;

View file

@ -0,0 +1 @@
mixin(import("code.txt"));

View 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

View 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

View file

@ -0,0 +1 @@
-include("my_header.hrl"). % Includes the file at my_header.erl

View file

@ -0,0 +1 @@
include matrix.fs

View file

@ -0,0 +1 @@
include ''char-literal-constant''

View file

@ -0,0 +1 @@
Read("file");

View 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"

View file

@ -0,0 +1 @@
$include "filename.icn"

View file

@ -0,0 +1 @@
require 'myheader.ijs'

View file

@ -0,0 +1 @@
load 'myheader.ijs'

View 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);

View file

@ -0,0 +1 @@
$.getScript("http://example.com/script.js");

View file

@ -0,0 +1 @@
require "myheader"

View file

@ -0,0 +1 @@
$include <somefile>

View file

@ -0,0 +1 @@
$include "somefile"

View file

@ -0,0 +1 @@
read "somefile":

View file

@ -0,0 +1 @@
Get["myfile.m"]

View 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)$

View file

@ -0,0 +1 @@
IMPORT InOut, NumConv, Strings;

View file

@ -0,0 +1 @@
include("file.php")

View file

@ -0,0 +1 @@
include_once("file.php")

View file

@ -0,0 +1 @@
require("file.php")

View file

@ -0,0 +1 @@
require_once("file.php")

View file

@ -0,0 +1,3 @@
#!/usr/bin/perl
do "include.pl"; # Utilize source from another file
sayhello();

View file

@ -0,0 +1,3 @@
sub sayhello {
print "Hello World!";
}

View file

@ -0,0 +1 @@
(load "file1.l" "file2.l" "file3.l")

View file

@ -0,0 +1 @@
consult('filename').

View file

@ -0,0 +1 @@
import mymodule

View file

@ -0,0 +1 @@
mymodule.variable

View file

@ -0,0 +1 @@
source("filename.R")

View file

@ -0,0 +1,2 @@
#lang racket
(include "other-file.rkt")

View file

@ -0,0 +1 @@
require 'file'

View file

@ -0,0 +1 @@
aFilename asFilename readStream fileIn

View file

@ -0,0 +1 @@
Smalltalk fileIn: aFilename

View file

@ -0,0 +1 @@
source "foobar.tcl"

View file

@ -0,0 +1 @@
package require foobar 1.3