(Delphi 7) Formula

MrCamarium

Utente Attivo
24
1
CPU
Pentium IV 3 Gh
Scheda Madre
Biostar
HDD
150 Gb
RAM
1,5 Gb
PSU
400
Case
Trasparente
OS
Windows 7 e Linux Ubuntu
Codice:
procedure TTriOnOff1.Button2Click(Sender: TObject);
var
X,Y,Z:INTEGER;
S:STRING[10];
nDouble: Double;
begin
  VAL(corrente.text,X,Z);
  VAL(hfe.text,Y,Z);
  nDouble := StrToFloatDef(Volt.text, 0);
  nDouble := (nDouble - 0.7) / (X / (Y / 3);
  STR(X,S);
  Label1.Caption := FloatToStr(Round(nDouble));
  VAL(corrente.text,X,Z);
  nDouble := StrToFloatDef(Volt.text, 0);
  nDouble := nDouble * ( X / 1000 );
  STR(X,S);
  Label22.Caption := FormatFloat('#0.##', nDouble);
end;
end.

Con questa riga:
Codice:
nDouble := (nDouble - 0.7) / (X / (Y / 3);
dovrei eseguire questa formula matematica:
(5-0.7) / (30 / (20 / 3)
ma mi da questo errore:
[Error] TriOnOff.pas(45): ')' expected but ';' found
dove sbaglio?
 

lorigio

Utente Attivo
817
238
CPU
Athlon II x3 435 With Noctua NH-D14
Scheda Madre
Asus M5A99X EVO AM3+
HDD
1TB + 160gb + WD My Passport Essential 500gb
RAM
Kingston ddr3 9-9-9-24 6gb 1333mhz
GPU
Gigabyte 5670 790mhz
Monitor
Samsung 22 pollici P2270HD
PSU
Corsair 400watt
Case
Cm 690 II advanced
OS
Windows 7 32 bit

Entra

oppure Accedi utilizzando
Discord Ufficiale Entra ora!