Skip to navigation Skip to content
Arvi Fox

Personal blog about IT, sport, travel etc.

  • Post a comment in Telegram
  • Main posts
  • Home
  • Blogs I read
  • For software engineers
  • Privacy
  • FAQ interview
  • Home
  • Blogs I read
  • FAQ interview
  • For software engineers
  • Privacy
Posted on June 15, 2012December 15, 2016 by arvifox

If 0 then print 0 else 1

[code language=”delphi”]
procedure TForm1.Button1Click(Sender: TObject);
var
a, b: integer;
begin
a := strtoint(Edit1.Text);
try
try
b := a div a;
except
on e: Exception do
b := 0;
end;
finally
Edit3.Text := inttostr(b);
end;
end;
[/code]

Category: IT
Tags: Delphi, tips & tricks

Post navigation

Previous post: Bracket sequence
Next post: F_ck
Donate
Donate, please. I need MacBook.
Categories
  • English (112)
  • Games (26)
  • IT (633)
  • Life (11)
Tag cloud
agile AI / ML / BigData / AR / VR / Computer vision algorithms android architecture C# computer graphics / geometry database debug Delphi developing tools/IDE devops dll faq firebase firebird game git google gradle graph theory internet / network interview / job java jetty kmp kotlin management meetup multithreading MySQL news/releases pattern performance PHP rx security / crypto sport programming Testing / QA theory / math tips & tricks UI/UX video / audio windows xml / xpath / json
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Яндекс.Метрика
Follow us
  • twitter
  • bitbucket
  • github
  • goodreads
  • stackoverflow
Recent Posts
  • Start building with Material 3 Expressive
  • Android Studio Meerkat Feature Drop
  • Compose Multiplatform 1.8.0 Released
  • Upgrading your build from Gradle 8.x to the latest
  • gui – cli
Comments
    © Arvi Fox 2025
    PrivacyBuilt with Storefront.