Hello world/Graphical: Difference between revisions

sort
(→‎{{header|Lambdatalk}}: adding lambdatalk task)
(sort)
 
(16 intermediate revisions by 13 users not shown)
Line 587:
Return</syntaxhighlight>
<syntaxhighlight lang="autohotkey">SplashTextOn, 100, 100, Rosetta Code, Goodbye, World!</syntaxhighlight>
 
=={{header|AutoHotKey V2}}==
<syntaxhighlight lang="autohotkey">
MsgBox("Goodbye, World!")
</syntaxhighlight>
 
=={{header|AutoIt}}==
Line 1,251 ⟶ 1,256:
 
RETURN
</syntaxhighlight>
 
=={{header|Crystal}}==
 
{{libheader|CrSFML}}
 
<syntaxhighlight lang="crystal">
require "crsfml"
 
window = SF::RenderWindow.new(SF::VideoMode.new(800, 600), "Hello world/Graphical")
 
# A font file(s) MUST be in the directory of the Crystal file itself.
# CrSFML does NOT load font files from the filesystem root!
font = SF::Font.from_file("DejaVuSerif-Bold.ttf")
 
text = SF::Text.new
text.font = font
 
text.string = "Goodbye, world!"
text.character_size = 24
 
text.color = SF::Color::Black
 
while window.open?
while event = window.poll_event
if event.is_a? SF::Event::Closed
window.close
end
end
window.clear(SF::Color::White)
window.draw(text)
window.display
end
</syntaxhighlight>
 
Line 1,328 ⟶ 1,369:
To differentiate only a GUI message use the <code>display_</code> verb.
<syntaxhighlight lang="diego">display_me()_msg(Goodbye, World!);</syntaxhighlight>
However, using the <code>_msg</code> (short for 'message') action will send a string message to the callee who may decide to display the string graphically...
<syntaxhighlight lang="diego">me_msg(Goodbye, World!);</syntaxhighlight>
 
Line 1,361 ⟶ 1,402:
=={{header|EasyLang}}==
 
[https://easylang.onlinedev/ideshow/#runcod=move%2010%2020%0Atext%20%22Goodbye%2C%20World%21%22y80vS1UwNFAwMuAqSa0oUVByz89PSapM1VEIzy/KSVFU4gIA Run it]
 
<syntaxhighlight lang="text">move 10 20
move 10 20
text "Goodbye, World!"</syntaxhighlight>
text "Goodbye, World!"
</syntaxhighlight>
 
=={{header|eC}}==
Line 1,423 ⟶ 1,466:
 
=={{header|Elena}}==
ELENA 56.0x :
<syntaxhighlight lang="elena">import forms;
Line 1,432 ⟶ 1,475:
constructor new()
<= super new()
{
self.Caption := "ELENA";
Line 1,482 ⟶ 1,525:
}</syntaxhighlight>
 
=={{header|Emacs Lisp}}==
<syntaxhighlight lang="lisp">
(message-box "Goodbye, World!")
</syntaxhighlight>
 
 
=={{header|Euphoria}}==
Line 1,517 ⟶ 1,566:
}
</syntaxhighlight>
 
=={{header|Fennel}}==
{{libheader|LÖVE}}
<syntaxhighlight lang="fennel">
(fn love.load []
(love.window.setMode 300 300 {"resizable" false})
(love.window.setTitle "Hello world/Graphical in Fennel!"))
 
(let [str "Goodbye, World!"]
(fn love.draw []
(love.graphics.print str 95 150)))
</syntaxhighlight>
To run this, you need to have LÖVE installed in your machine, and then run this command <code>fennel --compile love_test.fnl > main.lua; love .</code>. Since LÖVE has no compatibility with Fennel, we need to AOT-compile the file to a Lua file called <code>main.lua</code>, so then LÖVE can execute the program.
 
=={{header|Forth}}==
Line 1,598 ⟶ 1,660:
Compile with
<code>gfortran gtk2_mini.f90 -o gtk2_mini.x `pkg-config --cflags --libs gtk-2-fortran`</code>
 
 
=={{header|Fennel}}==
==={{libheader|LÖVE}}===
<syntaxhighlight lang="fennel">
(fn love.load []
(love.window.setMode 300 300 {"resizable" false})
(love.window.setTitle "Hello world/Graphical in Fennel!"))
 
(let [str "Goodbye, World!"]
(fn love.draw []
(love.graphics.print str 95 150)))
</syntaxhighlight>
To run this, you need to have LÖVE installed in your machine, and then run this command <code>fennel --compile love_test.fnl > main.lua; love .</code>. Since LÖVE has no compatibility with Fennel, we need to AOT-compile the file to a Lua file called <code>main.lua</code>, so then LÖVE can execute the program.
 
 
 
=={{header|FreeBASIC}}==
Line 2,382 ⟶ 2,428:
 
<syntaxhighlight lang="maxscript">messageBox "Goodbye world"</syntaxhighlight>
 
=={{header|MiniScript}}==
This implementation is for use with the [http://miniscript.org/MiniMicro Mini Micro] version of MiniScript.
<syntaxhighlight lang="miniscript">
import "textUtil"
 
hello = textUtil.Dialog.make("Hello, World Dialog", "Hello, World!")
hello.show
</syntaxhighlight>
 
=={{header|mIRC Scripting Language}}==
Line 3,479 ⟶ 3,534:
GoodByeApp().run()
</syntaxhighlight>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ $ "turtleduck.qky" loadfile ] now!
 
[ $ /
import turtle
size = from_stack()
words = string_from_stack()
turtle.write(words,align="center",
font=("Arial", size, "normal"))
/ python ] is write
 
turtle 0 frames
255 times
[ clear
i^ 3 of colour
$ "Goodbye, World!"
i write
frame ]</syntaxhighlight>
 
{{out}}
[[File:Quackery Goodbye World.gif]]
 
=={{header|R}}==
Line 3,624 ⟶ 3,702:
=={{header|Robotic}}==
Since visuals are already built in, [[Hello world/Newbie#Robotic|this link]] does the same thing.
 
=={{header|RPL}}==
{{works with|HP|48G}}
"Goodbye world!" MSGBOX
 
=={{header|Ruby}}==
Line 3,815 ⟶ 3,897:
=={{header|Sidef}}==
{{libheader|Tk}}
<syntaxhighlight lang="ruby">var tk = require('Tk');
var main = %s'O<MainWindow'>.new;
main.Button(
'-text' => 'Goodbye, World!',
'-command' => 'exit',
).pack;
tk.MainLoop;</syntaxhighlight>
 
{{libheader|Gtk2}}
<syntaxhighlight lang="ruby">var gtk2 = require('Gtk2') -> init;
 
var window = %O<Gtk2::Window>.new
var label = %O<Gtk2::Label>.new('Goodbye, World!')
 
window.set_title('Goodbye, World!')
window.signal_connect(destroy => { gtk2.main_quit })
 
window.add(label)
window.show_all
 
gtk2.main</syntaxhighlight>
 
{{libheader|Gtk3}}
var window = %s'Gtk2::Window'.new;
<syntaxhighlight lang="ruby">use('Gtk3 -init')
var label = %s'Gtk2::Label'.new('Goodbye, World!');
 
var gtk3 = %O'Gtk3'
window.set_title('Goodbye, World!');
var window = %O'Gtk3::Window'.new
window.signal_connect(destroy => func(*_){ gtk2.main_quit });
var label = %O'Gtk3::Label'.new('Goodbye, World!')
 
window.addset_title(label'Goodbye, World!');
window.signal_connect(destroy => { gtk3.main_quit })
window.show_all;
 
window.add(label)
window.show_all
 
gtk2gtk3.main;</syntaxhighlight>
 
=={{header|Slope}}==
Line 3,968 ⟶ 4,065:
say "Goodbye, World!"
stop this script</syntaxhighlight>
 
=={{header|True BASIC}}==
<syntaxhighlight lang="qbasic">SET WINDOW 0, 320, 0, 200
SET COLOR "YELLOW"
BOX AREA 20,50,40,60
SET COLOR "GREEN"
PLOT TEXT, AT 25, 45: "Goodbye, World!"
END</syntaxhighlight>
 
 
=={{header|TXR}}==
Line 4,170 ⟶ 4,276:
=={{header|Wren}}==
{{libheader|DOME}}
<syntaxhighlight lang="ecmascriptwren">import "graphics" for Canvas, Color
 
class Game {
62

edits