Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -0,0 +1,20 @@
begin
% String literals are enclosed in double-quotes in Algol W. %
% There isn't a separate character type but strings of lenghth one can %
% be used instead. %
% There are no escaping conventions used in string literals, except that %
% in order to have a double-quote character in a string, two double %
% quotes must be used. %
% Examples: %
% write a single character %
write( "a" );
% write a double-quote character %
write( """" );
% write a multi-character string - note the "\" is not an escape %
% and a\nb will appear on the output, not a and b on separate lines %
write( "a\nb" );
end.

View file

@ -0,0 +1,3 @@
IO.puts "Begin String \n============"
str = "string"
str |> is_binary # true

View file

@ -0,0 +1 @@
str |> String.codepoints

View file

@ -0,0 +1 @@
str <> <<0>>

View file

@ -0,0 +1,3 @@
?a # 97
Code.eval_string("?b") # 98
Code.eval_string("?ł") # 322

View file

@ -0,0 +1,4 @@
IO.inspect "Begin Char List \n============="
[115, 116, 114, 105, 110, 103]
ch = "hi"
'string #{ch}'

View file

@ -0,0 +1 @@
'string #{ch}'++[0]

View file

@ -0,0 +1,8 @@
(function () {
return "αβγδ 中间来点中文 🐫 אבגד"
})();
(function() {
return "\u03b1\u03b2\u03b3\u03b4 \u4e2d\u95f4\u6765\u70b9\u4e2d\u6587 \ud83d\udc2b \u05d0\u05d1\u05d2\u05d3";
})();

View file

@ -0,0 +1 @@
'This is an "atom" and not a string.'

View file

@ -0,0 +1 @@
"This 'string' will fool you if you're in a standard Prolog environment."

View file

@ -0,0 +1,2 @@
?- [97, 98, 99] = "abc".
true.

View file

@ -0,0 +1,2 @@
?- 97 = 0'a.
true.

View file

@ -0,0 +1,4 @@
?- [97, 98, 99] = "abc".
false.
?- [97, 98, 99] = `abc`.
true.

View file

@ -0,0 +1,13 @@
test_qq_odbc :-
myodbc_connect_db(Conn),
odbc_query(Conn, {|odbc||
select
P.image,D.description,D.meta_keywords,C.image,G.description
from
product P, product_description D, category C, category_description G, product_to_category J
where
P.product_id=D.product_id and
P.product_id=J.product_id and C.category_id=J.category_id and
C.category_id=G.category_id
|}, Row),
writeln(Row).

View file

@ -0,0 +1 @@
SELECT 'The boy said ''hello''.';