HP SunSoft Pascal 4.0 Manual do Utilizador Página 254

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 333
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 253
230 Pascal 4.0 Users Guide
10
Sample Program
The following program, xview.p, makes a window:
To compile xview.p and link in the necessary libraries, use the following
command-line. Replace local_library_path with the path for the Pascal XView
libraries on your system.
hostname% pc -Ilocal_library_path xview.p -L$OPENWINHOME/lib \
-lpxview -lxview -lolgx -lX11
Now run the executable file:
hostname% a.out
Soon after you run the executable file, the window opens as a single frame,
with the string Hello, World! in the frame header.
program hello(output);
#include "stddefs_p.h"
#include "attrgetset_p.h"
var
base_frame :Frame;
base_panel :Panel;
message :Xv_panel_or_item_ptr;
text :string;
begin
text :=
'Hello, World!';
xv_init(0);
base_frame := xv_create(nil, FRAME, 0);
base_panel := xv_create(base_frame, PANEL, 0);
message := xv_create(panel, PANEL_MESSAGE, 0);
set_PANEL_LABEL_STRING(message, text);
window_main_loop(base_frame);
end. {hello}
Vista de página 253
1 2 ... 249 250 251 252 253 254 255 256 257 258 259 ... 332 333

Comentários a estes Manuais

Sem comentários