标签: pascal

如何创建安装程序项目以构建Delphi应用程序的安装程序

我是Delphi的新手(之前曾在较低级别使用过Visual Studio),并且很难理解如何将项目编译成最终的应用程序/安装程序.我已经下载了Inno设置,我认为这是朝着正确方向迈出的一步.我用的是XE3.

任何帮助赞赏.

delphi pascal inno-setup delphi-xe3

-1
推荐指数
1
解决办法
1583
查看次数

Pascal或Delphi动画图像像Gifs

我试图在Delphi XE5中进行gif动画,但Android的Components库不包含Component"TGif图像".如何在表单中放置动画图像或Gif图像并将其播放为:

在此输入图像描述

谢谢.

delphi android pascal

-1
推荐指数
1
解决办法
987
查看次数

Pascal错误:直到预期其他发现

尝试编译"直到"预期发现"其他"时发生致命错误,似乎无法解决问题

......

   begin

divisor:= 2;
cont:= 0; 
write(i,':');

repeat

  if (i mod divisor = 0) then
     begin
write(' divisor ');
divisor:=succ(divisor);
cont:=succ(cont);
      end;

  else
divisor:=succ(divisor);

until (cont = 6) or (divisor>i div 2)

writeln();
    end;
end;
end. 
Run Code Online (Sandbox Code Playgroud)

pascal syntax-error

-1
推荐指数
1
解决办法
561
查看次数

我怎样才能安装pc,一个pascal编译器?

我只在我的系统中找到fpc而不是pc来编译pascal.该系统是redhat.我该如何安装电脑?我找到的唯一一个是http://www.freepascal.org/.但它似乎没有电脑.

pascal

-1
推荐指数
1
解决办法
107
查看次数

我在Pascal中得到一个括号错误.怎么了?

以下一行

writeln('The decimal equivalent is ', BinToDec(dec));
Run Code Online (Sandbox Code Playgroud)

给了我错误

找到'('预期但是')'

怎么了?

谢谢

delphi pascal

-1
推荐指数
1
解决办法
195
查看次数

将字符串更改为整数 - pascal

我不知道“xa”如何在 pascal 中转换为 10。我只是使用:

Val('xa',value,return);
Run Code Online (Sandbox Code Playgroud)

并且 value = 10,return = 0。我只是一个新手,有人可以解释一下吗?我知道这不会喜欢只是一个字符的 ASCII 原因。

我正在使用 Free Pascal :)

我在 Free Pascal 中进行了测试,当使用xa,0xa$xa. 所以,我认为它理解像“$”、“0”这样的特殊字符而不调用它。那正确吗?

delphi pascal freepascal turbo-pascal

-1
推荐指数
1
解决办法
1129
查看次数

DELPHI - 有没有办法释放在运行时创建的对象而不会出现“访问冲突”?

这个问题让我发疯,我有一个编辑框,我可以在其中写一些东西。在编辑框发生“更改”事件时,将创建一个 ListBox,并由 SQL 查询填充。它在写作时用作提示框。当我在要选择的项目上按 Enter 键时,列表框应该“空闲”,但它继续向我返回“访问冲突”。这里的代码:

procedure TFTimbra.EditCommessaKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  X, Y, W: Integer;
  QSugg: TAdoQuery;
begin
  if not Assigned(Suggerimento) then
  begin
    Suggerimento := TListBox.Create(Self);
    Y := EditCommessa.Top + EditCommessa.Height;
    X := EditCommessa.Left;
    W := EditCommessa.Width;

    with Suggerimento do
    begin
      Top := Y;
      Left := X;
      Width := W;
      Height := 200;
      Parent := FTimbra;
      BorderStyle := bsNone;
      Font.Size := 14;
      Font.Style := [fsBold];
    end;
  end else
    Suggerimento.Clear;

  if Key = 40 then
    Suggerimento.SetFocus;

  QSugg …
Run Code Online (Sandbox Code Playgroud)

delphi pascal runtime

-1
推荐指数
1
解决办法
185
查看次数

如何从 Delphi 中的 Richedit 中获得首次输出?

我的代码输出到富编辑时遇到问题。当我单击按钮计算所有内容然后显示所有内容时,它不会输出生成的 ClientNum 和 Price。但是,当我之后第二次单击该按钮时,它会毫不费力地输出所有内容?我的代码是否有问题,或者可能是诸如防病毒软件之类的外部问题干扰了输出?

图片来说明我在说什么:
在此处输入图片说明
在此处输入图片说明

我的代码:

    type
  TfrmTourBooking = class(TForm)
    rgpDestination: TRadioGroup;
    rgpAccommodation: TRadioGroup;
    sedPeopleAmount: TSpinEdit;
    Label1: TLabel;
    edtID: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    redOut: TRichEdit;
    btnCalc: TButton;
    bmbClose: TBitBtn;
    rgpTransport: TRadioGroup;
    edtName: TEdit;
    Label4: TLabel;
    rgpTourLength: TRadioGroup;
    edtPhoneNum: TLabeledEdit;
    edtEmail: TLabeledEdit;
    bmbReset: TBitBtn;
    dtpTime: TDateTimePicker;
    procedure FormActivate(Sender: TObject);
    procedure btnCalcClick(Sender: TObject);
    procedure rgpDestinationClick(Sender: TObject);
    procedure rgpTourLengthClick(Sender: TObject);
    procedure rgpAccommodationClick(Sender: TObject);
    procedure bmbResetClick(Sender: TObject);
    function GetFinalPriceWithVAT : real;
    function toString : string;
    const
    vatRate = 0.15;
  private
    { Private declarations …
Run Code Online (Sandbox Code Playgroud)

delphi pascal delphi-xe2

-1
推荐指数
1
解决办法
441
查看次数

浮点运算总和不动

嗯,好的坏的和丑的
为什么round(cargof)留在那里2

uses crt;

type 
    trail_type = (blue ,desert ,white);
    fruit_class = (none ,apple ,pineapple);
type
    ontherun = Record
    trail : trail_type;
    cargo : Integer;
    miles : Integer;
end;
Var 
    b : File of ontherun;
    rec : ontherun;
    rec_b : array[1..3] of ontherun;
    k , cargo , load , xload , miles , run : Integer;
    cargof  : Double;
    fruit : fruit_class;

begin
        cargof := 0;
        Repeat
            cargof := 0.04*cargof + 2.0;
            Writeln(round(cargof)); 
        Until cargof > …
Run Code Online (Sandbox Code Playgroud)

pascal freepascal

-1
推荐指数
1
解决办法
62
查看次数

lazarus/pascal用当前日期写文件名

我需要编写一个文件名包含当前日期的文件..一切都在日期之外,它给出了一个类异常'run error(3)'

(importo.text是TEdit的文本..但我想这是无关紧要的)

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;

...

var
  contributo:real;
  f:textfile;
...
  datee: string;

...

contributo:= (StrToInt(importo.text)/ 100)*4;

  datee:= DateToStr(Date);

  assignfile(f,'fattura minimi n.'+n.text+' '+datee+'.txt');
  rewrite(f);

  writeln(f,'Giovanna Migliore');
  ...

  closefile(f);
Run Code Online (Sandbox Code Playgroud)

delphi pascal freepascal lazarus

-2
推荐指数
1
解决办法
620
查看次数