.

Оператор присваивания языка FORTRAN

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 417
Скачать документ

Ieienoa?noai iaoee, aunoae oeieu e oaoie/aneie iieeoeee ?inneeneie
Oaaea?aoeee.

Iiaineae?neee Ainoaea?noaaiiue

Oaoie/aneee Oieaa?neoao.

Eo?niaay ?aaioa ii nenoaiiiio i?ia?aiie?iaaieth.

Iia?aoi? i?enaaeaaiey ycuea FORTRAN.

Oaeoeueoao: AAO.

Eaoaae?a: ANO.

A?oiia: A-513.

Nooaeaio: Aoeiaiei Aeaien Aeaaeeie?iae/.

I?aiiaeaaaoaeue: Oi?ieeia TH?ee Aeaaeeie?iae/.

Annenoaio: Iaiiaa Aa?a Ai?eniaia.

Aeaoa: 10 ethiy 1997 aiaea.

Ioiaoea i caueoa: _______________________________

Iiaineae?ne – 1997.

sscue iia?aoi?a.

sscue iia?aoi?a i?enaaeaaiey FORTRAN.

Eaeaioeoeeaoi? = a?eoiaoe/aneia au?aaeaiea

A?eoiaoe/aneia au?aaeaiea – au?aaeaiea, niaea?aeauaa a naaa iia?aoeee *,
/, -, +, **, a oaeaea ( ).

** – aicaaaeaiea a noaiaiue.

A?aiiaoeea ycuea.

G[]:

( =

( O(+O ( (O

O ( I (O(I ( O/I (O((I

I (() ( (

( A{A (Oe}[(]

( Oe{Oe}[.Oe{Oe}][(]

O – OA?I

I – IIA?AIAe

A – AOEAA

Oe – OeEO?A

AeAC – Ae?IAIIA AAC CIAEA

( – EIIAOe NO?IEE (ionoi)

** – AICAAAeAIEA A NOAIAIUe

Eeanneoeeaoeey a?aiiaoeee.

Aeaiiay a?aiiaoeea G[], niaeanii eeanneoeeaoeee Oiineiai,
yaeyaony eiioaenoii-naiaiaeiie, oae eae i?aaay /anoue eaaeaeie
?aaeoeoeee ia/eiaaony eeai n oa?ieiaeueiiai neiaiea, eeai n
iaoa?ieiaeueiiai, i?eiaaeeaaeauaai iauaaeei?iiiio neiaa?th.

A ( a, A(Vn, a(V(.

A?aiiaoeea G[] ia yaeyaony aaoiiaoiie, oae eae ia ana a?
?aaeoeoeee ia/eiathony n oa?ieiaeueiiai neiaiea. Ii yoie aea i?e/eia
aeaiiay a?aiiaoeea ia yaeyaony S – a?aiiaoeeie.

Iaoiae aiaeeca.

Aeey aeaiiie a?aiiaoeee ?aaeeciaai ?acai? iaoiaeii ?aeo?neaiiai nionea,
iineieueeo iia ioiineony e eeanno eiioaenoii-naiaiaeiuo.

Eaeay iaoiaea ninoieo a oii, /oi eaaeaeiio iaoa?ieiaeueiiio neiaieo
noaaeony a niioaaonoaea ii?aaeae?iiay i?ia?aiiiay aaeeieoea (ooieoeey),
eioi?ay ?aniicia?o oeaii/eo, ii?iaeaeaaioth yoei iaoa?ieiaeii.

Yoe i?ioeaaeo?u e ooieoeee aucuaathony a niioaaonoaee n i?aaeeaie
a?aiiaoeee e eiiaaea aucuaatho naie naay.

Aeaiiue iaoiae ?aaeeciaai ia ycuea C++, iineieueeo ii iaeaaeaao
?aeo?neaiuie aiciiaeiinoyie.

Aeeaaiinoeea e iaeo?aeecaoeey ioeaie.

Aeey aeaiiie a?aiiaoeee i?iecaiaeeony oieueei aeeaaiinoeea e
iaeo?aeecaoeey ioeaie. Eni?aaeaiea ioeaie ia i?iecaiaeeony.

Iaeo?aeecaoeey ioeaie inouanoaeyaony ii iaoiaeo Ae?iina, oi anoue,
nioneaynue ii neioaene/aneiio aea?aao aac aica?aoa ii eiioaenoo, i?e
iaia?oaeaiee ooieeiaie neooaoeee ioa?anuaathony oa eeoa?u (neiaieu),
eioi?ua i?eaaee a ooieeiaoth neooaoeeth e ?acai? i?iaeieaeaaony.

Oanoe?iaaiea.

12=1

Eiy eaeaioeoeeaoi?a aeieaeii ia/eiaoueny n aoeau.

\———————————————————\

s223=(s)+(((d)))

IOEAIE IAO!!!!!

\———————————————————\

sdsds=skshj**mxnx dc

I?iiouaia iia?aoeey eee iai?aaeeueiia eiy eaeaioeoeeaoi?a.

\———————————————————\

;;=0

Eiy eaeaioeoeeaoi?a aeieaeii ia/eiaoueny n aoeau.

Eaeaioeoeeaoi? ninoieo oieueei ec aoea eee oeeo?.

\———————————————————\

as=115/3

IOEAIE IAO!!!!!

\———————————————————\

32=-*=

Eiy eaeaioeoeeaoi?a aeieaeii ia/eiaoueny n aoeau.

I?iiouai eaeaioeoeeaoi? eee /enei.

I?iiouai eaeaioeoeeaoi? eee /enei.

Iaecaanoiay iia?aoeey eee iai?aaeeueiia eiy eaeaioeoeeaoi?a.

I?iiouai eaeaioeoeeaoi? eee /enei.

\———————————————————\

sdvsf+gsdf=0

Neaaa io ‘=’iia?aoeee auoue ia iiaeao .

\———————————————————\

jhg=321+321/54*4(s+25)

I?iiouaia iia?aoeey eee iai?aaeeueiia eiy eaeaioeoeeaoi?a.

\———————————————————\

d56gfsdfg=(ld+5

Aeeeia eiaie eaeaioeoeeaoi?a ia aeieaeia auoue aieueoa 6.

Ionoonoaoao ‘)’.

\———————————————————\

Eenoeia i?ia?aiiu.

// SP_KURS.CPP:EO?NIAAss ?AAIOA II NENOAIIIIO I?IA?AIIE?IAAIETH.
//

// IIA?AOI? I?ENAAEAAIEss ssCUEA “OI?O?AI”
//

// eiy oaeea test

#include

#include

#include

#include

#include

#include

#include

#define UP 72 /* no?aeea aaa?o */

#define DOWN 80 /* no?aeea aiec */

#define EXIT ‘\33’ /* Esc */

#define END 100

enum LEX{ERROR,CBZ,ID,PLUS,MIN,DIV,MUL,STEP,SKL,SKR,RAV,_EOLN_,_EOF_};

int next,number=0,num=0,temp,line=1,err[80],sum;

int mistake[15][80],ofset=0;

char cordinat[80][80],filename[80];

char* type_mis[]={“IOEAIE IAO!!!!!”,

“Eiy eaeaioeoeeaoi?a aeieaeii ia/eiaoueny n aoeau.”,

“Eaeaioeoeeaoi? ninoieo oieueei ec aoea eee oeeo?.”,

“Neaaa io ‘=’iia?aoeee auoue ia iiaeao .”,

“Iaecaanoiay eiino?oeoeey (iao ‘=’).”,

“Aeeeia eiaie eaeaioeoeeaoi?a ia aeieaeia auoue aieueoa 6.”,

“Ionoonoaoao ‘)’.”,

“Iaecaanoiay iia?aoeey eee iai?aaeeueiia eiy eaeaioeoeeaoi?a.”,

“I?iiouai eaeaioeoeeaoi? eee /enei.”,

“Ionoonoaoao ‘(‘.”,

“I?iiouaia iia?aoeey eee iai?aaeeueiia eiy eaeaioeoeeaoi?a.”,

“Ionoonoaoao au?aaeaiea (A=?) . “,

“Ionoonoaoao eaeaioeoeeaoi?(?=B).”,

” “,};

const int X1=2,Y1=20,X2=80,Y2=25;

const int YWINDOW=Y2-Y1+1;

void viewwin(int ,int );

void putmistake(int );

int MENU(char *);

void identif();

void ravno();

void expr(void);

void term(void);

void operand(void);

int scaner(void);

void error(int);

void makefile(void);

FILE *in,*out;

void main(void)

{strcpy(cordinat[0],”\n”);

mistake[0][0]=13;mistake[0][1]=END;

clrscr();

printf(“Aaaaeeoa eiy ia?aaaouaaaiiai oaeea:”);

gets(filename);

if((in=fopen(filename,”r”))==NULL)

{printf(“\n IOEAEA!!! OAEE N OAEEI EIAIAI IA NOUANOAOAO!!!”);

exit(-1);

}

while(!feof(in))

{ravno();

mistake[line][ofset]=END;

line++;

ofset=0;

}

fcloseall();

makefile();

num=0;

window(1,1,80,25);

clrscr();

gotoxy(1,1);

MENU(” IIA?AOI? I?ENAAEAAIEss ssCUEA /””OI?O?AI/””\n”);

clrscr();

window(1,1,80,25);

clrscr();

printf(“\n\n\n\n\n\n\n\n\n\n ANA IOEAEE O?AIssOUeNss A OAEEA
/””ERRORS.TXT/””!!!!!”);

printf(“\n\n\n\n\n\n\n\n\n\n IAAEIEOA ETHAOTH
EEAAEOO!!!!!! “);

fcloseall();

exit(1);

}

void ravno()

{temp=0;

num=0;

sum=0;

next=scaner();

if((next!=_EOLN_)&&(next!=_EOF_))

{if(next==RAV)

{error(12);

err[0]=END;

}

else identif();

if(next!=RAV) error(4);

else

{temp=1;

if(err[0]!=END)

{if(err[0]!=ID) error(1);

for(int i=1;i6) error(5);

}

// IAOA?IEIAE “O”

void operand()

{if(next==SKL)

{next=scaner();

expr();

if(next!=SKR) error(6);

else next=scaner();

}

else

{if(next==ID){identif();next=scaner();}

else

{if(next!=CBZ)

{if((next!=_EOLN_)&&(next!=_EOF_))

{if(next==ERROR)

{error(7);

next=scaner();

operand();

}

else

{if(next==RAV) error(7);

else error(8);

}

}

else error(8);

}

else next=scaner();

}//else

}//else

}

// IAOE?IEIAE “A”

void expr(void)

{term();

while((next==PLUS)||(next==MIN))

{next=scaner();

expr();

}

}

// IAOA?IEIAE “T”

void term(void)

{operand();

while((next==DIV)||(next==MUL)||(next==STEP))

{next=scaner();

term();

}

}

void error(int choice)

{switch(choice)

{case 1:mistake[line][ofset++]=1; break;

case 2:mistake[line][ofset++]=2; break;

case 3:mistake[line][ofset++]=3; break;

case 4:mistake[line][ofset++]=4; break;

case 5:mistake[line][ofset++]=5; break;

case 6:mistake[line][ofset++]=6; break;

case 7:mistake[line][ofset++]=7; break;

case 8:mistake[line][ofset++]=8; break;

case 9:mistake[line][ofset++]=9; break;

case 10:mistake[line][ofset++]=10; break;

case 12:mistake[line][ofset++]=12; break;

case 11:mistake[line][ofset++]=11; break;

default:break;

}

}

void makefile(void)

{char *s;

int num_str=0,oftemp,rep;

if((out=fopen(“errors.txt”,”w”))==NULL)

{printf(“\n IOEAEA!!! OAEE N OAEEI EIAIAI IA NOUANOAOAO!!!”);

exit(-1);

}

if((in=fopen(filename,”r”))==NULL)

{printf(“\n IOEAEA!!! OAEE IAEUeCss IOE?UOUe AeEss CAIENE!!!”);

exit(-1);

}

while(num_str++,fgets(s,80,in)!=NULL)

{fputs(“\\———————————————————\\”,
out);

fputc(‘\n’,out);

fputs(s,out);

fputc(‘\n’,out);

rep=strlen(s);

s[rep-1]=’\0′;

strcpy(cordinat[num_str],s);

if((oftemp=mistake[num_str][0])==END)

{fputs(type_mis[0],out);

fputc(‘\n’,out);

}

else

{for(int k=0;mistake[num_str][k]!=END;k++)

{oftemp=mistake[num_str][k];

fputs(type_mis[oftemp],out);

fputc(‘\n’,out);

}

}

}

fputs(“\\———————————————————\\”,ou
t);

fputc(‘\n’,out);

fcloseall();

}

// MENU

int MENU(char *s)

{int dy,n;

dy=line-1;

textbackground(WHITE);

textcolor(YELLOW);

window(1,1,80,25);

clrscr();

gotoxy(2,1);

cprintf(” SDenis\n “);

gotoxy(2,2);

cputs(s);

gotoxy(2,3);

cprintf(“Eniieuecoeoa eo?ni? aaa?o/aiec aeey auai?a i?iniao?eaaaiie
no?iee.\n”);

gotoxy(2,4);

cprintf(“ – aeey i?iniio?a ioeaie a no?iea(no?iea auaeaeyaony).
\n”);

gotoxy(2,5);

cprintf(“ – auoiae.\n”);

gotoxy(2,6);

textbackground(WHITE);

textcolor(RED);

cprintf(“******************** IOEAEE A NO?IEAO
*************************\n”);

textbackground(WHITE);

textcolor(YELLOW);

gotoxy(2,19);

cprintf(“******************* NO?IEE AAOAAI OAEEA
****************************\n”);

window(X1,Y1,X2,Y2);

textcolor(BLACK);

viewwin(0,YWINDOW);

n = 0;

int Y=1;

while(1)

{char c;

gotoxy(1,Y);

textbackground(GREEN);

cprintf(“%s”,cordinat[n]);

textbackground(WHITE);

c=(c=getch())==0?c=getch():c;

gotoxy(1,Y);

cprintf(“%s”,cordinat[n]);

switch (c)

{case EXIT:

return(-1);

case ‘\r’: /*enter*/

window(2,7,80,18);

clrscr();

putmistake(n);

window(X1,Y1,X2,Y2);

break;

case UP:

if (Y==1) viewwin(n>0?n-1:n,YWINDOW);

else Y–;

if(n>0) n–;

break;

case DOWN:

if(Y==YWINDOW) viewwin((n==dy?n:n+1)-YWINDOW+1,YWINDOW);

else Y++;

if(n+1==dy)

{n=0;

Y=1;

viewwin(n,YWINDOW);

}

else n++;

break;

}

}

}

void viewwin(int num,int numline)

{clrscr();

for(int a=0;a

Eeoa?aoo?a. Eo?n eaeoeee ii nenoaiiiio i?ia?aiie?iaaieth. Aa?aa?o Oeeaeo «C aeey i?ioanneiiaeueiuo i?ia?aiienoia». A.I. Eaaaaeaa «Aaaaeaiea a nenoaiu i?ia?aiie?iaaiey»

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Ответить

Заказать реферат!
UkrReferat.com. Всі права захищені. 2000-2020