task_url
stringlengths
30
116
task_name
stringlengths
2
86
task_description
stringlengths
0
14.4k
language_url
stringlengths
2
53
language_name
stringlengths
1
52
code
stringlengths
0
61.9k
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#C.23
C#
int a=0,b=1/a;
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Computer.2Fzero_Assembly
Computer/zero Assembly
STP
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Crystal
Crystal
raise "fire"
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#F.23
F#
  0/0  
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Factor
Factor
+
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#APL
APL
display dialog "Goodbye, World!" buttons {"Bye"}
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Common_Lisp
Common Lisp
  (ql:quickload :cffi)   (defconstant +SIGINT+ 2)   (defmacro set-signal-handler (signo &body body) (let ((handler (gensym "HANDLER"))) `(progn (cffi:defcallback ,handler :void ((signo :int)) (declare (ignore signo)) ,@body) (cffi:foreign-funcall "signal" :int ,signo :pointer (cffi...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Crystal
Crystal
start = Time.utc ch = Channel(Int32 | Symbol).new   spawn do i = 0 loop do sleep 1 ch.send(i += 1) end end   Signal::INT.trap do Signal::INT.reset ch.send(:kill) end   loop do x = ch.receive break if x == :kill puts x end   elapsed = Time.utc - start puts "Program has run for %5.3f seconds." % e...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Perl
Perl
use Data::Dumper qw(Dumper);   sub hashJoin { my ($table1, $index1, $table2, $index2) = @_; my %h; # hash phase foreach my $s (@$table1) { push @{ $h{$s->[$index1]} }, $s; } # join phase map { my $r = $_; map [$_, $r], @{ $h{$r->[$index2]} } } @$table2; }   @table1 = ([27, "Jonah"], ...
http://rosettacode.org/wiki/Haversine_formula
Haversine formula
This page uses content from Wikipedia. The original article was at Haversine formula. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) The haversine formula is an equation important in navigation, g...
#ATS
ATS
  #include "share/atspre_staload.hats"   staload "libc/SATS/math.sats" staload _ = "libc/DATS/math.dats" staload "libc/SATS/stdio.sats" staload "libc/SATS/stdlib.sats"   #define R 6372.8 #define TO_RAD (3.1415926536 / 180)   typedef d = double   fun dist ( th1: d, ph1: d, th2: d, ph2: d ) : d = let val ph1 = ph1 - ...
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#EchoLisp
EchoLisp
  (begin (write "GoodBye, World") (write "Next on same line"))  
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Elena
Elena
public program() { //print will not append a newline console.write("Goodbye, World!") }
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Elixir
Elixir
  IO.write "Goodbye, World!"  
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#eC
eC
class GoodByeApp : Application { void Main() { PrintLn("Hello world!"); } }
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Falcon
Falcon
  keys = [ 'a', 'b', 'c', 'd' ] values = [ 1, 2, 3, 4 ] hash = [ => ] for i in [ 0 : keys.len() ]: hash[ keys[ i ] ] = values[ i ]  
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Fantom
Fantom
  class Main { public static Void main () { keys := [1,2,3,4,5] values := ["one", "two", "three", "four", "five"]   // create an empty map map := [:] // add the key-value pairs to it keys.size.times |Int index| { map.add(keys[index], values[index]) } } }  
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#CLU
CLU
digit_sum = proc (n: int) returns (int) sum: int := 0 while n > 0 do sum := sum + n // 10 n := n / 10 end return (sum) end digit_sum   harshads = iter (n: int) yields (int) while true do n := n + 1 if n // digit_sum(n) = 0 then yield(n) end end end harshads   sta...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Pare
Pare
(print "hello world")
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#PARI.2FGP
PARI/GP
print("Hello, world!")
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#PepsiScript
PepsiScript
=head1 Obtaining perl   On the majority of UNIX and UNIX-like operating systems (Linux, Solaris, AIX, HPUX, et cetera), perl will already be installed. Mac OS X also ships with perl. Note that "Perl" refers to the language while "perl" refers to the interpreter used to run Perl programs.   Windows does not ship wit...
http://rosettacode.org/wiki/Harmonic_series
Harmonic series
This page uses content from Wikipedia. The original article was at Harmonic number. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) In mathematics, the n-th harmonic number is the sum of the recipr...
#Ring
Ring
  decimals(12) sum = 0 nNew = 1 limit = 13000 Harmonic = []     for n = 1 to limit sum += 1/n add(Harmonic,[n,sum]) next   see "The first twenty harmonic numbers are:" + nl for n = 1 to 20 see "" + Harmonic[n][1] + " -> " + Harmonic[n][2] + nl next see nl   for m = 1 to 10 for n = nNew to len(Harmonic) ...
http://rosettacode.org/wiki/Harmonic_series
Harmonic series
This page uses content from Wikipedia. The original article was at Harmonic number. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) In mathematics, the n-th harmonic number is the sum of the recipr...
#Rust
Rust
  use num::rational::Ratio; use num::{BigInt, FromPrimitive};   fn main() { for n in 1..=20 { println!("Harmonic number {} = {}", n, harmonic_number(n.into())); }   println!("Harmonic number 100 = {}", harmonic_number(100.into()));   let max = 5; let mut target = 1; let mut i = 1; wh...
http://rosettacode.org/wiki/Harmonic_series
Harmonic series
This page uses content from Wikipedia. The original article was at Harmonic number. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) In mathematics, the n-th harmonic number is the sum of the recipr...
#Verilog
Verilog
module main; integer n, i; real h;   initial begin h = 0.0;   $display("The first twenty harmonic numbers are:"); for(n=1; n<=20; n=n+1) begin h = h + 1.0 / n; $display(n, " ", h); end $display("");   h = 1.0; n = 2; for(i=2; i<=10; i=i+1) begin while (h < i) beg...
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#FALSE
FALSE
.
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Fermat
Fermat
Func S=S. S;
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#FreeBASIC
FreeBASIC
poke 0,0
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Go
Go
package main; import "fmt"; func main(){a, b := 0, 0; fmt.Println(a/b)}
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#GW-BASIC
GW-BASIC
0 gosub 0
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#AppleScript
AppleScript
display dialog "Goodbye, World!" buttons {"Bye"}
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#D
D
import core.stdc.signal; import core.thread; import std.concurrency; import std.datetime.stopwatch; import std.stdio;   __gshared int gotint = 0; extern(C) void handleSigint(int sig) nothrow @nogc @system { /* * Signal safety: It is not safe to call clock(), printf(), * or exit() inside a signal handler. ...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Erlang
Erlang
#! /usr/bin/env escript   main([]) -> erlang:unregister(erl_signal_server), erlang:register(erl_signal_server, self()), Start = seconds(), os:set_signal(sigquit, handle), Pid = spawn(fun() -> output_loop(1) end), receive {notify, sigquit} -> erlang:exit(Pid, normal), ...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Phix
Phix
with javascript_semantics constant A = {{27,"Jonah"}, {18,"Alan"}, {28,"Glory"}, {18,"Popeye"}, {28,"Alan"}}, B = {{"Jonah","Whales"}, {"Jonah","Spiders"}, {"Alan", "Ghosts"}, {"Alan", "Zombies"}, {"...
http://rosettacode.org/wiki/Haversine_formula
Haversine formula
This page uses content from Wikipedia. The original article was at Haversine formula. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) The haversine formula is an equation important in navigation, g...
#AutoHotkey
AutoHotkey
MsgBox, % GreatCircleDist(36.12, 33.94, -86.67, -118.40, 6372.8, "km")   GreatCircleDist(La1, La2, Lo1, Lo2, R, U) { return, 2 * R * ASin(Sqrt(Hs(Rad(La2 - La1)) + Cos(Rad(La1)) * Cos(Rad(La2)) * Hs(Rad(Lo2 - Lo1)))) A_Space U }   Hs(n) { return, (1 - Cos(n)) / 2 }   Rad(Deg) { return, Deg * 4 * ATan(1) / 180 }
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Emacs_Lisp
Emacs Lisp
(princ "Goodbye, World!")
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Erlang
Erlang
io:format("Goodbye, world!").
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#ERRE
ERRE
  ....... PRINT("Goodbye, World!";) .......  
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#EchoLisp
EchoLisp
  (display "Hello world!" "color:blue")  
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#FreeBASIC
FreeBASIC
Dim As String keys(1 To 5) = {"1", "2", "3", "4", "5"} Dim As String values(1 To 5) = {"one", "two", "three", "four", "five"} Dim As String hash(Lbound(keys) To Ubound(keys)) Dim As Integer i, temp   For i = Lbound(values) To Ubound(values) temp = Val(keys(i)) hash(temp) = values(i) Next i   For i = Lbound(has...
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#COBOL
COBOL
identification division. program-id. harshad. environment division. data division. working-storage section. *> for storing first 20 harshad-niven numbers 01 harshads. 03 harshad pic 9(5) occurs 20 times indexed by niven.   *> numbers tested for harshad-niven-ness. 01 first-num pic 9(5). 01 second-num p...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Perl
Perl
=head1 Obtaining perl   On the majority of UNIX and UNIX-like operating systems (Linux, Solaris, AIX, HPUX, et cetera), perl will already be installed. Mac OS X also ships with perl. Note that "Perl" refers to the language while "perl" refers to the interpreter used to run Perl programs.   Windows does not ship wit...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Phix
Phix
puts(1,"Hello world!")
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#PHP
PHP
<?php echo 'Hello, world!'; ?>
http://rosettacode.org/wiki/Harmonic_series
Harmonic series
This page uses content from Wikipedia. The original article was at Harmonic number. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) In mathematics, the n-th harmonic number is the sum of the recipr...
#Wren
Wren
import "/big" for BigRat import "/fmt" for Fmt   var harmonic = Fn.new { |n| (1..n).reduce(BigRat.zero) { |sum, i| sum + BigRat.one/i } }   BigRat.showAsInt = true System.print("The first 20 harmonic numbers and the 100th, expressed in rational form, are:") var numbers = (1..20).toList numbers.add(100) for (i in number...
http://rosettacode.org/wiki/Harmonic_series
Harmonic series
This page uses content from Wikipedia. The original article was at Harmonic number. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) In mathematics, the n-th harmonic number is the sum of the recipr...
#XPL0
XPL0
func real Harmonic(N); \Return Nth harmonic number int N; real X; [X:= 1.0; while N >= 2 do [X:= X + 1.0/float(N); N:= N-1]; return X; ];   int N, M; [for N:= 1 to 20 do [RlOut(0, Harmonic(N)); if rem(N/5) = 0 then CrLf(0); ]; for M:= 1 to 10 do [N:= 1; repeat N:= N+1 until Harmonic(N) >...
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Haskell
Haskell
main = error "Instant crash"
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Julia
Julia
@assert false "Halt and catch fire."
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Liberty_BASIC
Liberty BASIC
Let
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Lua
Lua
error(1)
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Mathematica.2FWolfram_Language
Mathematica/Wolfram Language
Abort[]
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Nim
Nim
assert false
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#Applesoft_BASIC
Applesoft BASIC
1 LET T$ = "GOODBYE, WORLD!" 2 LET R = 5:GX = 3:GY = 2:O = 3:XC = R + GX:YC = R * 2 + GY 3 TEXT : HOME : TEXT : HGR : HCOLOR= 7: HPLOT 0,0: CALL 62454: HCOLOR= 6 4 LET L = LEN (T$): FOR I = 1 TO L:K = ASC ( MID$ (T$,I,1)):XO = XC:YO = YC: GOSUB 5:XC = XO + 1:YC = YO: GOSUB 7: NEXT : END 5 IF K > 64 THEN K ...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#F.23
F#
open System   let rec loop n = Console.WriteLine( n:int ) Threading.Thread.Sleep( 500 ) loop (n + 1)   let main() = let start = DateTime.Now Console.CancelKeyPress.Add( fun _ -> let span = DateTime.Now - start printfn "Program has run for %.0f seconds" span.T...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Forth
Forth
-28 constant SIGINT   : numbers ( n -- n' ) begin dup . cr 1+ 500 ms again ;   : main utime 0 begin ['] numbers catch SIGINT = until drop utime d- dnegate <# # # # # # # [char] . hold #s #> type ." seconds" ;   main bye
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#FreeBASIC
FreeBASIC
Dim Shared As Double start start = Timer   Dim As Integer n = 1 Dim As String s Do Print n s = Inkey If s = Chr(255) + "k" Then Dim As Double elapsed = Timer- start + n * 0.5 Print Using "Program has run for & seconds."; elapsed End Else Sleep 500, 1 n += 1 E...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#PHP
PHP
<?php function hashJoin($table1, $index1, $table2, $index2) { // hash phase foreach ($table1 as $s) $h[$s[$index1]][] = $s; // join phase foreach ($table2 as $r) foreach ($h[$r[$index2]] as $s) $result[] = array($s, $r); return $result; }   $table1 = array(array(27, "Jonah"), ...
http://rosettacode.org/wiki/Haversine_formula
Haversine formula
This page uses content from Wikipedia. The original article was at Haversine formula. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) The haversine formula is an equation important in navigation, g...
#AWK
AWK
  # syntax: GAWK -f HAVERSINE_FORMULA.AWK # converted from Python BEGIN { distance(36.12,-86.67,33.94,-118.40) # BNA to LAX exit(0) } function distance(lat1,lon1,lat2,lon2, a,c,dlat,dlon) { dlat = radians(lat2-lat1) dlon = radians(lon2-lon1) lat1 = radians(lat1) lat2 = radians(lat2) a = (si...
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Euphoria
Euphoria
-- In Euphoria puts() does not insert a newline character after outputting a string puts(1,"Goodbye, world!")
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#F.23
F#
  // A program that will run in the interpreter (fsi.exe) printf "Goodbye, World!";;   // A compiled program [<EntryPoint>] let main args = printf "Goodbye, World!" 0  
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Factor
Factor
USE: io "Goodbye, World!" write
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#ECL
ECL
  OUTPUT('Hello world!');  
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Frink
Frink
  a = new dict[["a", "b", "c"], [1, 2, 3]]  
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Gambas
Gambas
Public Sub Main() Dim sValue As String[] = ["Zero", "One", "Two", "Three", "Four", "Five"] Dim sKey As String[] = [0, 1, 2, 3, 4, 5] Dim sCol As New Collection Dim siCount As Short   For siCount = 0 To sKey.max sCol.Add(sValue[siCount], sKey[siCount]) Next   For siCount = 0 To sKey.max Print Str(sicount) & " = " & ...
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#ColdFusion
ColdFusion
  <Cfset harshadNum = 0> <Cfset counter = 0>   <Cfloop condition="harshadNum lte 1000">   <Cfset startnum = harshadNum + 1> <Cfset digits = 0> <Cfset harshad = 0>   <Cfloop condition="Harshad eq 0">   <Cfset current_i = startnum> <Cfset digits = 0>   <cfloop condition="len(current_i) gt 1"> <C...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#PicoLisp
PicoLisp
$ apt-get install picolisp
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Pixilang
Pixilang
fputs("Hello world!\n")
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Plain_English
Plain English
To run: \This is a comment Start up. Write "Hello World!" to the console. wAIt fOr tHe eScApE kEY. \Plain English is case-insensitive Shut down.
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Pascal
Pascal
begin pByte($0)^ := 0 end.
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Perl
Perl
&a
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#PL.2FM
PL/M
100H: GOTO 0; EOF
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Phix
Phix
?9/0
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Python
Python
0/0
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Quackery
Quackery
> quackery Welcome to Quackery. Enter "leave" to leave the shell. Building extensions. /O> ' tuck take ... Quackery system damage detected. Python reported: maximum recursion depth exceeded
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Raku
Raku
++8
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#Arendelle
Arendelle
// title "Hello, World!" // first spacings [ 5 , rd ] // body /* H */ [7,pd][4,u][3,pr][3,d][7,pu]drr /* E */ [6,pd][4,pr]l[3,u][2,lp][3,u][3,pr]r /* L */ [7,pd]u[3,rp][6,u]rr /* L */ [7,pd]u[3,rp][6,u]rr /* O */ [7,pd]u[2,rp]r[6,pu][3,pl][5,r] /* , */ [5,d]prpd[3,pld][9,u][5,r] /* */ ...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Gambas
Gambas
hTimer As Timer fTime As Float   Public Sub Application_Signal(x As Integer)   Print "Program stopped after " & fTime & " seconds" Quit   End   Public Sub Main()   hTimer = New Timer As "IntTimer"   Print "Press [Ctrl] + " & Chr(92) & " to stop"   Signal[Signal.SIGQUIT].Catch   With hTimer .Delay = 500 .Start End W...
http://rosettacode.org/wiki/Handle_a_signal
Handle a signal
Most operating systems provide interrupt facilities, sometimes called signals either generated by the user or as a result of program failure or reaching a limit like file space. Unhandled signals generally terminate a program in a disorderly manner. Signal handlers are created so that the program behaves in a well-defi...
#Go
Go
package main   import ( "fmt" "os" "os/signal" "time" )   func main() { start := time.Now() k := time.Tick(time.Second / 2) sc := make(chan os.Signal, 1) signal.Notify(sc, os.Interrupt) for n := 1; ; { // not busy waiting, this blocks until one of the two // channel o...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#PicoLisp
PicoLisp
(de A (27 . Jonah) (18 . Alan) (28 . Glory) (18 . Popeye) (28 . Alan) )   (de B (Jonah . Whales) (Jonah . Spiders) (Alan . Ghosts) (Alan . Zombies) (Glory . Buffy) )   (for X B (let K (cons (char (hash (car X))) (car X)) (if (idx 'M K T) (push (caar @) (cdr X)) (...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Plain_TeX
Plain TeX
\newtoks\tabjoin \def\quark{\quark} \def\tabA{27:Jonah,18:Alan,28:Glory,18:Popeye,28:Alan} \def\tabB{Jonah:Whales,Jonah:Spiders,Alan:Ghosts,Alan:Zombies,Glory:Buffy} \def\mergejoin{\tabjoin{}\expandafter\mergejoini\tabA,\quark:\quark,} \def\mergejoini#1:#2,{% \ifx\quark#1\the\tabjoin \else \def\mergejoinii##1,#2:##...
http://rosettacode.org/wiki/Haversine_formula
Haversine formula
This page uses content from Wikipedia. The original article was at Haversine formula. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) The haversine formula is an equation important in navigation, g...
#BASIC
BASIC
  CONST pi = 3.141593 ' define pi CONST radio = 6372.8 ' radio de la tierra en km   PRINT : PRINT " Distancia de Haversine:"; PRINT Haversine!(36.12, -86.67, 33.94, -118.4); "km" END   FUNCTION Haversine! (lat1!, long1!, lat2!, long2!) deg2rad! = pi / 180 ' define grados a radianes 0.01745..   dLong! ...
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Falcon
Falcon
print("Goodbye, World!")
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#Fantom
Fantom
  class Main { Void main() { echo("Goodbye, World!") } }  
http://rosettacode.org/wiki/Hello_world/Newline_omission
Hello world/Newline omission
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output. Task Display the string   Goodbye, World!   without a trailing newline. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Standard error   Hello world/Text
#FOCAL
FOCAL
TYPE "Goodbye, World!"
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#EDSAC_order_code
EDSAC order code
[ Print HELLO WORLD ] [ A program for the EDSAC ] [ Works with Initial Orders 2 ]   T64K [ Set load point: address 64 ] GK [ Set base address ] O13@ [ Each O order outputs one ] O14@ [ character. The numerical ] O15@ [ parameter gives the offset ] O16@ [ (from the base address) where ] O17@ [ the character to ...
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Go
Go
package main   import "fmt"   func main() { keys := []string{"a", "b", "c"} vals := []int{1, 2, 3} hash := map[string]int{} for i, key := range keys { hash[key] = vals[i] } fmt.Println(hash) }
http://rosettacode.org/wiki/Hash_from_two_arrays
Hash from two arrays
Task Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values) Related task   Associative arrays/Creation
#Groovy
Groovy
def keys = ['a','b','c'] def vals = ['aaa', 'bbb', 'ccc'] def hash = [:] keys.eachWithIndex { key, i -> hash[key] = vals[i] }
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#Comal
Comal
0010 FUNC digit'sum(n) 0020 sum:=0 0030 WHILE n>0 DO sum:+n MOD 10;n:=n DIV 10 0040 RETURN sum 0050 ENDFUNC digit'sum 0060 // 0070 FUNC next'harshad(n) 0080 REPEAT 0090 n:+1 0100 UNTIL n MOD digit'sum(n)=0 0110 RETURN n 0120 ENDFUNC next'harshad 0130 // 0140 PRINT "First 20 Harshad numbers: " 0150 n:=0 ...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#PowerShell
PowerShell
"Hello, World!" #This is a comment.
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Processing
Processing
print("Hello World!");
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Installing_Processing
Installing Processing
print("Hello World!");
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#REXX
REXX
_=1;_+=
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Ring
Ring
  try see 5/0 catch see "Catch!" + nl + cCatchError done  
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Ruby
Ruby
  raise  
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Rust
Rust
  fn main(){panic!("");}  
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Swift
Swift
fatalError("You've met with a terrible fate, haven't you?")
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Tiny_BASIC
Tiny BASIC
0 gosub 0
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Vlang
Vlang
fn main() { panic(0) }
http://rosettacode.org/wiki/Halt_and_catch_fire
Halt and catch fire
Task Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok? The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an...
#Wren
Wren
Fiber.abort("")
http://rosettacode.org/wiki/GUI/Maximum_window_dimensions
GUI/Maximum window dimensions
The task is to determine the maximum height and width of a window that can fit within the physical display area of the screen without scrolling. This is effectively the screen size (not the total desktop area, which could be bigger than the screen display area) in pixels minus any adjustments for window decorations an...
#Ada
Ada
with Gtk.Main; with Glib; with Gtk.Window; use Gtk.Window; with Gtk.Enums; use Gtk.Enums; with Ada.Text_IO; use Ada.Text_IO;   procedure Max_Size is   Win  : Gtk_Window; Win_W, Win_H : Glib.Gint; package Int_Io is new Integer_IO (Glib.Gint); Hid : Gtk.Main.Quit_Handler_Id;   begin Gtk.Main.Ini...
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#Arturo
Arturo
popup "" "Goodbye, World!"
http://rosettacode.org/wiki/Hello_world/Graphical
Hello world/Graphical
Task Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.). Related task   Hello world/Text
#ATS
ATS
// #include "share/atspre_define.hats" #include "share/atspre_staload.hats" // (* ****** ****** *)   staload UN = $UNSAFE   (* ****** ****** *)   staload "{$GLIB}/SATS/glib.sats"   (* ****** ****** *)   staload "{$GTK}/SATS/gdk.sats" staload "{$GTK}/SATS/gtk.sats" staload "{$GLIB}/SATS/glib-object.sats"   (* ****** ***...