Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

AW: Integer/Extended inkompatible

  Alt 15. Dez 2020, 11:23
Ich bin erstaunt, dass das noch niemand erwähnt hat aber es gibt auch eine reine Integer-Division in Delphi:
nBl := StrToInt(BreiteNamen.Text) div 2 - 2;
Allerdings kommt da dann logischerweise immer eine Ganzzahl raus (Integer). d.h. 5 div 2 = 2
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat