Şimdi Ara

gwbasic yardım

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
2
Cevap
0
Favori
527
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • ey can dost güzel insanlar,okulda şu gwbasic denen dandik bir basic dersi görüyorum.aşağıdaki kodda .dat dosyasına kayıt ekleme ,kayıt kayıt arama gibi şeyler var fakat isimden arama yapıyor numaradan aramada hata veriyor bi bakabilirmisiniz
    3300 den itibaren numaradan arama başlıyor burada yanlış olan ne?


    10 cls
    20 locate 3,30 :print “ANA MENÜ”
    30 locate 9,30 :print “1-Kayıt Ekleme”
    40 locate 10,30 :print “2-Kayıt Listeleme”
    50 locate 11,30 :print “3-Kayıt Arama”
    60 locate 12,30 :input “Seçiminiz:”,sec
    1000 if sec=1 then cls:locate 9,30 :print”KAYIT EKLEME”
    1010 open “A”,#1,”kayit.dat”
    1020 input “Ad giriniz:” ,ad$
    1030 input “Soyad giriniz:”,soy$
    1040 input “Numara giriniz:”,nm
    1050 input “Notunu giriniz:”,nt
    1060 input “Bölümü giriniz:”,bol$
    1070 input “ONAYLIYOR MUSUNUZ E/H:” ,onay$
    1080 if onay$=”e” then write #1,ad$,soy$,nm,nt,bol$ : close #1
    1090 if onay$="h" then goto 10
    2000 if sec=2 then cls : locate 2,30 : print "KAYIT LİSTELEME" else goto 3000
    2010 open "I",#1,"kayit.dat"
    2020 sat=6
    2030 locate 4,10 :print "Adı"
    2040 locate 4,27 :print "Soyadı"
    2050 locate 4,40 :print "Numara"
    2060 locate 4,55 :print "Notu"
    2070 locate 4,65 :print "Bölümü"
    2080 locate 5,9 :print "________________________________________________________"
    2090 if eof(1) then goto goto 2180
    2100 input #1,ad$,soy$,nm,nt,bol$
    2110 locate sat,10 : print ad$
    2120 locate sat,27 : print soy$
    2130 locate sat,40 : print nm
    2140 locate sat,55 : print nt
    2150 locate sat,65 : print bol$
    2160 sat=sat+1
    2170 goto 2090
    2180 close #1
    3000 if sec=3 then cls :locate 2,30 :print "KAYIT ARAMA" else goto 4000
    3010 locate 9,30 :print "1-Ada göre Arama"
    3020 locate 10,30 :print "2-Numaraya göre arama"
    3030 locate 11,30 :print "3-Bölüme göre arama"
    3040 locate 17,30 :input "Seçiminiz:" ,sec2
    3050 if sec2=1 then cls :locate 2,30 :print "ADA GÖRE ARAMA" else goto 3300
    3060 input "Aranacak adı giriniz:",ara$
    3070 cls
    3080 sat=6
    3090 locate 4,10 :print "Adı"
    3100 locate 4,27 :print "Soyadı"
    3110 locate 4,40 :print "Numara"
    3120 locate 4,55 :print "Notu"
    3130 locate 4,65 :print "Bölümü"
    3140 locate 5,10 :print "_____________________________________________________________________"
    3150 open "I",#1,"kayit.dat"
    3160 if eof(1) then goto 3260
    3170 input #1,ad$,soy$,nm,nt,bol$
    3180 if left$(ad$,len(ara$))<>ara$ then goto 3160
    3190 locate sat,10 : print ad$
    3200 locate sat,27 : print soy$
    3210 locate sat,40 : print nm
    3220 locate sat,55 : print nt
    3230 locate sat,65 : print bol$
    3240 sat=sat+1
    3250 goto 3160
    3260 close #1
    3300 if sec2=2 then then cls :locate 2,30 :print "NUMARAYA GÖRE ARAMA" else goto 3600
    3310 input "Aranacak numarayı giriniz:",aranm
    3320 cls
    3330 sat=6
    3340 locate 4,10 :print "Adı"
    3350 locate 4,27 :print "Soyadı"
    3360 locate 4,40 :print "Numara"
    3370 locate 4,55 :print "Notu"
    3380 locate 4,65 :print "Bölümü"
    3390 locate 5,10 :print "_____________________________________________________________________"
    3400 open "I",#1,"kayit.dat"
    3410 if eof(1) then goto 3510
    3420 input #1,ad$,soy$,nm,nt,bol$
    3430 if left$(nm,len(aranm))<>aranm then goto 3410
    3440 locate sat,10 : print ad$
    3450 locate sat,27 : print soy$
    3460 locate sat,40 : print nm
    3470 locate sat,55 : print nt
    3480 locate sat,65 : print bol$
    3490 sat=sat+1
    3500 goto 3410
    3510 close #1







  • bunu
     
    3430 if left$(nm,len(aranm))<>aranm then goto 3410


    böyle değiştir sanırım düzelir. sen string olarak aramaya çalışmışsın.

      
    3430 if nm<>aranm then goto 3410
  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.