Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Delphi - (Delphi 7) Formula
Forum - Delphi - (Delphi 7) Formula

Avatar
camaleonteplus (Normal User)
Pro


Messaggi: 95
Iscritto: 05/03/2009

Segnala al moderatore
Postato alle 10:33
Lunedė, 19/03/2012
Codice sorgente - presumibilmente Delphi

  1. procedure TTriOnOff1.Button2Click(Sender: TObject);
  2. var
  3. X,Y,Z:INTEGER;
  4. S:STRING[10];
  5. nDouble: Double;
  6. begin
  7.   VAL(corrente.text,X,Z);
  8.   VAL(hfe.text,Y,Z);
  9.   nDouble := StrToFloatDef(Volt.text, 0);
  10.   nDouble := (nDouble - 0.7) / (X / (Y / 3);
  11.   STR(X,S);
  12.   Label1.Caption := FloatToStr(Round(nDouble));
  13.   VAL(corrente.text,X,Z);
  14.   nDouble := StrToFloatDef(Volt.text, 0);
  15.   nDouble := nDouble * ( X / 1000 );
  16.   STR(X,S);
  17.   Label22.Caption := FormatFloat('#0.##', nDouble);
  18. end;
  19. end.



Con questa riga:
Codice sorgente - presumibilmente Plain Text

  1. 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?

PM Quote
Avatar
()
Newbie


Messaggi:
Iscritto:

Segnala al moderatore
Postato alle 11:13
Lunedė, 19/03/2012
manca una parentesi in
Codice sorgente - presumibilmente Plain Text

  1. nDouble := (nDouble - 0.7) / (X / (Y / 3);


PM Quote