Sayfayı Yazdır | Pencereyi Kapat

Do While Döngüsü

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1272
Tarih: 09 Şubat 2026 Saat 20:24
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Do While Döngüsü
Mesajı Yazan: Melih
Konu: Do While Döngüsü
Mesaj Tarihi: 09 Şubat 2026 Saat 16:50
Udemy kursunda 19. videoyu izlerken do while döngüsü kodlarını denemeye çalıştım fakat kod örneklerini denerken hata aldım

Videodan örnek kod 1:

var
i: Integer;
{
  i=1;
  do
  {
    ShowMessage(i);
    Inc(i);
  }
  while(i>5)
}

Hata:

Unit Main: Syntax error.

Source position: 5,4
Clomosy Build : 20260114.140736

Videodan örnek kod 2:

var
sayi: Float;
{
  do
  sayi=Random()*70;
  ShowMessage('Rastgele alınan değer istenilen aralıktadır.'+IntToStr(sayi));
  while (sayi>50);
  ShowMessage('Döngüden çıkıldı. Sayı: '+IntToStr(sayi));
}

Hata:
Unit Main: Syntax error.

Source position: 4,4
Clomosy Build : 20260114.140736

Dökümantasyonda do while ile ilgili örnek bir kod var mı diye baktım fakat bulamadım. ( https://www.docs.clomosy.com/Loops" rel="nofollow - https://www.docs.clomosy.com/Loops )
https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Cevaplar:
Mesajı Yazan: M-Guney
Mesaj Tarihi: 09 Şubat 2026 Saat 17:13
Do While yerine Repeat Until deneyebilirsin neredeyse aynı şekilde çalışmaktadır.
var
i: Integer;
{
  i=1;
  Repeat
  {
    ShowMessage(i);
    Inc(i);
  }
  until(i>5);
}

//Örnek kod 2:
var
sayi: Float;
{
  repeat
  {
    sayi=Random()*70;
    ShowMessage('Rastgele alınan değer istenilen aralıktadır.'+IntToStr(sayi));
  }
  until (sayi>50);
  ShowMessage('Döngüden çıkıldı. Sayı: '+IntToStr(sayi));
}
https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net