forum.boolean.name

forum.boolean.name (http://forum.boolean.name/index.php)
-   Основной форум (http://forum.boolean.name/forumdisplay.php?f=49)
-   -   Проблем... трабл... капут (http://forum.boolean.name/showthread.php?t=694)

ZeFiR 18.02.2006 21:46

Админы, классный форум. На оффсайте мидлет паскаля тупее...
к теме. xt в коде неправильно? прога ставит в степень число...
Код:

program Stepen;

var a, b, c : string;
item1,item2, item3,label_id,l1,l2,lx1,lx2,dd: integer;
a2, b2, c2,d,x1, x2:real;
cmdNext : command;
cmdQuit : command;
cmdStart, clicked,clicked1 : command;
cmdOK:command;


begin
 // switch to form mode from default canvas mode
 ShowForm;
 
 // add a text field to the form
 item1 := FormAddTextField('A:', '', 20, TF_ANY);
 item2 := FormAddTextField('B:', '', 20, TF_ANY);
 
 // create a command (button)
 cmdNext := CreateCommand('OK!', CM_OK, 1);
 AddCommand(cmdNext);
 
 // wait until the user clickes on Go! command
 repeat until GetClickedCommand = cmdNext;
 
 // retrieve the entered name
 a:= FormGetText(item1);
 b:=FormGetText(item2);
 a2:=StringToReal(a,1);
 b2:=StringToReal(b,1);
 c2:=pow(a2,b2);
 
 // switch back to canvas mode and draw the text
 ClearForm;
 ShowForm;
 
 lx1:=FormAddString(IntegerToString(trunc(c2)));
 
 // create a quit command
 cmdQuit := CreateCommand('Quit', CM_EXIT, 1);
 AddCommand(cmdQuit);
 repeat until GetClickedCommand = cmdQuit; 
end.

:bad:


Часовой пояс GMT +4, время: 21:01.

vBulletin® Version 3.6.5.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Перевод: zCarot