Ïðèìåð: Ãëîáàëüíàÿ ñåòü INTERNET
ß èùó:
Íà ãëàâíóþ  |  Äîáàâèòü â èçáðàííîå  

Ãëàâíàÿ/

Ïðîãðàììèðîâàíèå, áàçû äàííûõ. /

Áàçû äàííûõ â ïðàêòèêå

Äîêóìåíò 1 | Äîêóìåíò 2 | Äîêóìåíò 3 | Äîêóìåíò 4

proc pri_ipl  (kaf)

#include "box.ch"

#define NULL 0

set cursor off

clear

@ 5,5 say "Ïðåïîäàâàòåëü "

@ 5,22 get prepod

read

sele 10

use &kaf+"npr"

go top

locate for Prep=prepod

*ïðîâåðèòü íà eof

if eof()

   clear

   @ 5,5 say "Îøèáêà ââîäà!!!"

endif

adr_p=recno()

sele 11

use &kaf+"np1"

locate for A_pr=adr_p

*ïå÷àòü øàïêè òàáëèöû

@ 1,1 say "Èíäèâèäóàëüíûé ïëàí ïðåïîäàâàòåëÿ"

@ 1,40 say prepod

@ 2,1 say "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"

@ 3,1 say "³ Ïðåäìåò          ³Ãðóïïà³Âèä çàí.³  1 ñåìåñòð  ³  2 ñåìåñòð  ³ Èòîãî       ³"

@ 4,1 say "³                  ³      ³        ³Ïî ïëàíó³Ôàêò³Ïî ïëàíó³Ôàêò³Ïî ïëàíó³Ôàêò³"

@ 5,1 say "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄ´"

i=6

flag=.t.

sum_s_1=0

sum_s_2=0

sum_all=0

do while flag

   n_sem=mod(Sem,2)

   if n_sem = 0

      n_sem = 2

   endif

   local zan[9]

   if Lek>0

      zan[1]=.t.

      tnum=1

   endif

   if Pz>0

      zan[2]=.t.

      tnum=2

   endif

   if Lba>0

      zan[3]=.t.

      tnum=3

   endif

   if Irs>0

      zan[4]=.t.

      tnum=4

   endif

   if Kur>0

      zan[5]=.t.

      tnum=5

   endif

   if Kon>0

      zan[6]=.t.

      tnum=6

   endif

   if Konsu>0

      zan[7]=.t.

      tnum=7

   endif

   if Zac>0

      zan[8]=.t.

      tnum=8

   endif

   if Exz>0

      zan[9]=.t.

      tnum=9

   endif

   @ i,1 say "³"

   @ i,3 say pred

   @ i,20 say "³"

   @ i,21 say gr

   @ i,27 say "³"

   for count = 1 to tnum

       if zan[count]

          do case

             case count=1

                @ i,28 say "Ëåêöèè"

             case count=2

                @ i,28 say "Ïð.çàí."

             case count=3

                @ i,28 say "Ëàáîðàò."

             case count=4

                @ i,28 say "ÈÐÑ"

             case count=5

                @ i,28 say "Êóðñîâ."

             case count=6

                @ i,28 say "Êîíòð."

             case count=7

                @ i,28 say "Êîíñóëüò."

             case count=8

                @ i,28 say "Çà÷åò"

             case count=9

                @ i,28 say "Ýêçàìåí"

          endcase

          if n_sem=1

             @ i,36 say "³"

             col=37

          else

             @ i,36 say "³        ³    ³"

             col=51

          endif

          do case

             case count=1

                @ i,col say Lek

             case count=2

                @ i,col say Pz

             case count=3

                @ i,col say Lba

             case count=4

                @ i,col say Irs

             case count=5

                @ i,col say Kur

             case count=6

                @ i,col say Kon

             case count=7

                @ i,col say Konsu

             case count=8

                @ i,col say Zac

             case count=9

                @ i,col say Exz

          endcase

          if n_sem=1

             @ i,45 say "³    ³        ³    ³"

          else

             @ i,59 say "³    ³"

          endif

          if count = tnum

             @ i,65 say sump

             @ i++,73 say "³    ³"

             @ i++,1 say "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄ´"

          else

             @ i++,64 say "³        ³    ³"

          endif

       endif

   next

   if n_sem=1

      sum_s_1+=Sump

      sum_all+=Sump

   else

      sum_s_2+=Sump

      sum_all+=Sump

   endif

   if A_next = NULL

      @ i,1 say "³                  ³      ³        ³        ³    ³        ³    ³"

      @ i,65 say sum_all

      @ i++,73 say"³    ³"

      @ i,1 say "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÙ"

      flag = .f.

   else

      go A_next

   endif

enddo

@ i+1,5 say "Âûâîäèòü íà ïå÷àòü [y\n] "

@ i+1,40 get otw

read

if otw = "Y" .or. "y"

   tab_print(prepod)

endif

return


Copyright © 2005—2007 «RefStore.Ru»