Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
47
Task/Hello-world-Graphical/Ada/hello-world-graphical.adb
Normal file
47
Task/Hello-world-Graphical/Ada/hello-world-graphical.adb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
with Gdk.Event; use Gdk.Event;
|
||||
with Gtk.Label; use Gtk.Label;
|
||||
with Gtk.Window; use Gtk.Window;
|
||||
with Gtk.Widget; use Gtk.Widget;
|
||||
|
||||
with Gtk.Handlers;
|
||||
with Gtk.Main;
|
||||
|
||||
procedure Windowed_Goodbye_World is
|
||||
Window : Gtk_Window;
|
||||
Label : Gtk_Label;
|
||||
|
||||
package Handlers is new Gtk.Handlers.Callback (Gtk_Widget_Record);
|
||||
package Return_Handlers is
|
||||
new Gtk.Handlers.Return_Callback (Gtk_Widget_Record, Boolean);
|
||||
|
||||
function Delete_Event (Widget : access Gtk_Widget_Record'Class)
|
||||
return Boolean is
|
||||
begin
|
||||
return False;
|
||||
end Delete_Event;
|
||||
|
||||
procedure Destroy (Widget : access Gtk_Widget_Record'Class) is
|
||||
begin
|
||||
Gtk.Main.Main_Quit;
|
||||
end Destroy;
|
||||
|
||||
begin
|
||||
Gtk.Main.Init;
|
||||
Gtk.Window.Gtk_New (Window);
|
||||
Gtk_New (Label, "Goodbye, World!");
|
||||
Add (Window, Label);
|
||||
Return_Handlers.Connect
|
||||
( Window,
|
||||
"delete_event",
|
||||
Return_Handlers.To_Marshaller (Delete_Event'Access)
|
||||
);
|
||||
Handlers.Connect
|
||||
( Window,
|
||||
"destroy",
|
||||
Handlers.To_Marshaller (Destroy'Access)
|
||||
);
|
||||
Show_All (Label);
|
||||
Show (Window);
|
||||
|
||||
Gtk.Main.Main;
|
||||
end Windowed_Goodbye_World;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#include <GUIConstantsEx.au3>
|
||||
|
||||
$hGUI = GUICreate("Hello World") ; Create the main GUI
|
||||
GUICtrlCreateLabel("Goodbye, World!", -1, -1) ; Create a label dispalying "Goodbye, World!"
|
||||
|
||||
GUISetState() ; Make the GUI visible
|
||||
|
||||
While 1 ; Infinite GUI loop
|
||||
$nMsg = GUIGetMsg() ; Get any messages from the GUI
|
||||
Switch $nMsg ; Switch for a certain event
|
||||
Case $GUI_EVENT_CLOSE ; When an user closes the windows
|
||||
Exit ; Exit
|
||||
|
||||
EndSwitch
|
||||
WEnd
|
||||
|
|
@ -0,0 +1 @@
|
|||
MsgBox(0, "Goodbye", "Goodbye, World!")
|
||||
|
|
@ -0,0 +1 @@
|
|||
ToolTip("Goodbye, World!")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import ballerina/http;
|
||||
|
||||
service / on new http:Listener(9090) {
|
||||
|
||||
// This function responds with `string` value `Hello, World!` to HTTP GET requests.
|
||||
resource function get greeting() returns string {
|
||||
return "Goodbye, World!";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
CLASS-ID ProgramClass.
|
||||
METHOD-ID Main STATIC.
|
||||
PROCEDURE DIVISION.
|
||||
INVOKE TYPE Application::EnableVisualStyles() *> Optional
|
||||
INVOKE TYPE MessageBox::Show("Goodbye, World!")
|
||||
END METHOD.
|
||||
END CLASS.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
CLASS-ID GoodbyeWorldWPF.Window IS PARTIAL
|
||||
INHERITS TYPE System.Windows.Window.
|
||||
METHOD-ID NEW.
|
||||
PROCEDURE DIVISION.
|
||||
INVOKE self::InitializeComponent()
|
||||
END METHOD.
|
||||
END CLASS.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<Window x:Class="COBOL_WPF.Window1"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Hello world/Graphical">
|
||||
<TextBox>Goodbye, World!</TextBox>
|
||||
</Window>
|
||||
62
Task/Hello-world-Graphical/COBOL/hello-world-graphical-4.cob
Normal file
62
Task/Hello-world-Graphical/COBOL/hello-world-graphical-4.cob
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
*>
|
||||
*> cobweb-gui-hello, using gtk-label
|
||||
*> Tectonics:
|
||||
*> cobc -w -xj cobweb-gui-hello.cob cobweb-gtk.cob \
|
||||
*> `pkg-config --libs gtk+-3.0`
|
||||
*>
|
||||
identification division.
|
||||
program-id. cobweb-gui-hello.
|
||||
|
||||
environment division.
|
||||
configuration section.
|
||||
repository.
|
||||
function new-window
|
||||
function new-box
|
||||
function new-label
|
||||
function gtk-go
|
||||
function all intrinsic.
|
||||
|
||||
data division.
|
||||
working-storage section.
|
||||
|
||||
01 TOPLEVEL usage binary-long value 0.
|
||||
01 HORIZONTAL usage binary-long value 0.
|
||||
01 VERTICAL usage binary-long value 1.
|
||||
|
||||
01 width-hint usage binary-long value 160.
|
||||
01 height-hint usage binary-long value 16.
|
||||
|
||||
01 spacing usage binary-long value 8.
|
||||
01 homogeneous usage binary-long value 0.
|
||||
|
||||
01 extraneous usage binary-long.
|
||||
|
||||
01 gtk-window-data.
|
||||
05 gtk-window usage pointer.
|
||||
01 gtk-container-data.
|
||||
05 gtk-container usage pointer.
|
||||
|
||||
01 gtk-box-data.
|
||||
05 gtk-box usage pointer.
|
||||
01 gtk-label-data.
|
||||
05 gtk-label usage pointer.
|
||||
|
||||
procedure division.
|
||||
cobweb-hello-main.
|
||||
|
||||
*> Main window and top level container
|
||||
move new-window("Hello", TOPLEVEL, width-hint, height-hint)
|
||||
to gtk-window-data
|
||||
move new-box(gtk-window, VERTICAL, spacing, homogeneous)
|
||||
to gtk-container-data
|
||||
|
||||
*> Box, across, with simple label
|
||||
move new-box(gtk-container, HORIZONTAL, spacing, homogeneous)
|
||||
to gtk-box-data
|
||||
move new-label(gtk-box, "Goodbye, World!") to gtk-label-data
|
||||
|
||||
*> GTK+ event loop now takes over
|
||||
move gtk-go(gtk-window) to extraneous
|
||||
|
||||
goback.
|
||||
end program cobweb-gui-hello.
|
||||
19
Task/Hello-world-Graphical/COBOL/hello-world-graphical-5.cob
Normal file
19
Task/Hello-world-Graphical/COBOL/hello-world-graphical-5.cob
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
program-id. ghello.
|
||||
data division.
|
||||
working-storage section.
|
||||
01 var pic x(1).
|
||||
01 lynz pic 9(3).
|
||||
01 colz pic 9(3).
|
||||
01 msg pic x(15) value "Goodbye, world!".
|
||||
procedure division.
|
||||
accept lynz from lines end-accept
|
||||
divide lynz by 2 giving lynz.
|
||||
accept colz from columns end-accept
|
||||
divide colz by 2 giving colz.
|
||||
subtract 7 from colz giving colz.
|
||||
display msg
|
||||
at line number lynz
|
||||
column number colz
|
||||
end-display
|
||||
accept var end-accept
|
||||
stop run.
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import xforms;
|
||||
import forms;
|
||||
|
||||
public class MainWindow : XForm, using(MainWindow)
|
||||
{
|
||||
constructor new()
|
||||
<= super new()
|
||||
{
|
||||
}
|
||||
|
||||
private onExit(sender)
|
||||
{
|
||||
forward Program.stop()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(message-box "Goodbye, World!")
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
include msgbox.e
|
||||
|
||||
integer response
|
||||
response = message_box("Goodbye, World!","Bye",MB_OK)
|
||||
|
|
@ -0,0 +1 @@
|
|||
GraphicsWindow.DrawText(5, 5, "Goodbye, World!")
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
require "bitmap"
|
||||
|
||||
local bmp = bitmap.of(200, 50)
|
||||
bmp:text("Goodbye, World!", 10, 10, color.white)
|
||||
bmp:view()
|
||||
|
|
@ -0,0 +1 @@
|
|||
New-Label "Goodbye, World!" -FontSize 24 -Show
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
$form = New-Object System.Windows.Forms.Form
|
||||
$label = New-Object System.Windows.Forms.Label
|
||||
|
||||
$label.Text = "Goodbye, World!"
|
||||
$form.AutoSize = $true
|
||||
$form.AutoSizeMode = [System.Windows.Forms.AutoSizeMode]::GrowAndShrink
|
||||
$form.Controls.Add($label)
|
||||
|
||||
$Form.ShowDialog() | Out-Null
|
||||
|
|
@ -0,0 +1 @@
|
|||
[System.Windows.Forms.MessageBox]::Show("Goodbye, World!")
|
||||
|
|
@ -0,0 +1 @@
|
|||
alert "Goodbye, World!"
|
||||
13
Task/Hello-world-Graphical/Rye/hello-world-graphical.rye
Normal file
13
Task/Hello-world-Graphical/Rye/hello-world-graphical.rye
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
fyne: import\go "fyne"
|
||||
|
||||
app: import\go "fyne/app"
|
||||
|
||||
widget: import\go "fyne/widget"
|
||||
|
||||
a: app/new
|
||||
|
||||
w: a .window "Hello"
|
||||
|
||||
w .set-content widget/label "Hello fyne world!"
|
||||
|
||||
w .show-and-run
|
||||
|
|
@ -0,0 +1 @@
|
|||
MsgBox("Goodbye, World!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue