/*------------------------------------------------- Reguła N-1 w innym wydaniu -------------------------------------------------*/ makro void Makro5 int I, bKoniec; float F; string S; file fIn; { I = Obszar("Kraj"); I = ZapDane("DaneBin.bin"); S = cprintf("--------------------------------"); S = cprintf("Rozpływ bazowy"); F = calclf(); gosub PoliczPrzeciazenia; if(LiczbaPrzeciazen==0) fIn = fopen("RegN_1+.txt", "r"); Wiersz = getline( fIn ); bKoniec=0; do I = CzytDane("DaneBin.bin"); S = cprintf("--------------------------------"); S = cprintf("%s",Wiersz); gosub ZrobWylaczenie; //w tym sub okreslamy, czy doszlismy do konca pliku F = calclf(); //Rozpływ gosub PoliczPrzeciazenia; while( bKoniec==0 ); I = fclose(fIn); endif; I = CzytDane("DaneBin.bin"); } sub ZrobWylaczenie string Wiersz string S1, S2; { do Wiersz = getline( fIn ); S1 = getstr(Wiersz,1,1); S2="#"; if( S1==S2) ;//słowo kluczowe I=1; S1=getstr(Wiersz,1,7); S2="#koniec"; if( S1==Wiersz ) bKoniec=1; //koniec pliku - słowo kluczowe #koniec endif; else S1=getword(Wiersz,1," "); S2=getword(Wiersz,2," "); I = strtof(S1); if( I==-1 ) I = WylGal(S2); endif; if( I==1 ) I = ZalGal(S2); endif; I=0; endif; while(I==0); } sub PoliczPrzeciazenia int LiczbaPrzeciazen { if( Calc[].Rslt==1 ) LiczbaPrzeciazen = 0; I = PrzGal(100,2); LiczbaPrzeciazen = LiczbaPrzeciazen + I; I = PrzWez( 105.0,110, 123.0); LiczbaPrzeciazen = LiczbaPrzeciazen + I; I = PrzWez( 210.0,220, 245.0); LiczbaPrzeciazen = LiczbaPrzeciazen + I; I = PrzWez( 380.0,400, 420.0); LiczbaPrzeciazen = LiczbaPrzeciazen + I; else LiczbaPrzeciazen = -100; endif }