Микита Бєлошенко
 

Тут я розміщую свої сторінки. В деяких групах відвідувачі сайту можуть розміщувати свої сторінки або редагувати, доповнювати, коментувати вже існуючі.

подать объявление

Додати до обраного Відправити мені e-mail
     
Що нового?
Про власника сайту
Зображення
Файловий архів
Щоденник
Форум
Сторінки
Посилання
Чат
Лічильник
Друзі
Мітки
Опитування
Митець Юлія Красна
nikitabeloshenko.com
Google blog
1ua
Радіоінженер Анатолій Бєлошенко
Митець Карасьова Олександра
 
Цікаві сайти
 
 
Відвідувачі
 
 
Календар
 
<
Травень 2012
>
ПнВтСрЧтПтСбНд
 123456
78910111213
14151617181920
21222324252627
28293031
 
Підписка
 
E-mail: 
 
 
 
 
Яку мову програмування Ви використовуєте?

Результати опитування
 
Інші сайти
 
prostokvaw
juliakrasnaya Юлія Красна
sud СПРАВЕДЛИВИЙ СУД
zen-alona Альона Зень
jesypenko Олег Лаврись
 
Коментовані запису
 
 
Топ коментаторів
 
beloshenko Микита Бєлошенко
Коментрі: 223
nazar123 Назар
Коментрі: 8
alisa-2009 alisa
Коментрі: 7
falkons2 sergey
Коментрі: 5
lola605 lola
Коментрі: 5
  Повернутися на головнуМикита Бєлошенко / Сторінки / Programs / Стара версія проекту коду MLMP на С. Це поетапний результат перекладу з мови програмування Паскаль та з адоптацією до дії в середовищі налаштованому під ОС Лабіринт.  

Стара версія проекту коду MLMP на С. Це поетапний результат перекладу з мови програмування Паскаль та з адоптацією до дії в середовищі налаштованому під ОС Лабіринт.

0.00 (0)

Продовження перекладу MLMP з Pascal на C. Фрагмент.

//--------------------
//   MLMP Library
//--------------------


#include "pasemul.h"

#include "Counter.h"
#include "Memory.h"
#include "Module15.h"     

#define BufSize 250                 //+
#define StackSize 1000              //+

extern TP70_String cmExit = "Выход_из_программы";
extern TP70_String cmGoto = "Перейти_к";
extern TP70_String cmEQUid = ":=";
extern TP70_String cmvEQUid = "=";
extern TP70_String cmbLeft = "";
extern TP70_String cmRepeat = "Цикл";
extern TP70_String cmWrForX = "Записать_значение_цикла_в";
extern TP70_String cmExWFor = "Выход_из_цикла";
extern TP70_String cmVar = "Создать_переменную";
extern TP70_String cmReal = "Реальное_число";
extern TP70_String cmInteger = "Целое_число";
extern TP70_String cmString = "Строка_символов";
extern TP70_String cmChar = "Один_символ";

class MyVar                         //+
{                                   //+
public:                             //+
  TP70_String* Name;
  float*  R;
  int*    I;
  TP70_String* S;
  char*   C;                        //+
};                                  //+

int MFinder[StackSize+1];           //+
int BFinder[BufSize+1];             //+

class MType : public ThisProgram    //+
{                                   //+
public:                             //+
  GString* List[100+1];
  int*    MyMem[1000+1];
};                                  //+

class MClass : public ThisProgram   //+
{                                   //+
public:                             //+
  TP70_String* List[100+1];
  int*    MyMem[1000+1];
  TP70_String* Proc[100+1];
  TP70_String* Func[100+1];
};                                  //+

class COMMAND : public ThisProgram  //+
{                                   //+
public:                             //+
  TP70_String ErrMsg;            
  int NumRC;                        //+
  TP70_String Buffer[BufSize+1];
  TP70_String GetLastCommand();
  TP70_String GetNLastCommand(int N);
  int RunLabel(TP70_String Str);
  int cEQUDecode(TP70_String MLT, TP70_String S, MyVar EQU);
  void ClearBuffer();
  void SetCommandLine(TP70_String Str);
  void ReWriteBuffer(TP70_String Str);
  void RunBuffer();
  void RunCommand(TP70_String Str);
  void MLGotoCommand(TP70_String Command);
  void MLForCommand(TP70_String Command);
  void MLWriteForIntoX(TP70_String Command);
  void MLExitWithFor(TP70_String Command);
  void MLIfCommand(TP70_String Command);
  void MLProcedureCommand(TP70_String Command);
  void MLFunctionCommand(TP70_String Command);
  void MLTypeCommand(TP70_String Command);
  void MLObjectCommand(TP70_String Command);
  void MLConstCommand(TP70_String Command);
  void MLVarCommand(TP70_String Command);
};                                  //+

class MLEQUs : public Command       //+
{                                   //+
public:                             //+
  int EQUDecode(TP70_String MLT, TP70_String S, MyVar EQU);
  float RealDecode(TP70_String Str);
  int IntegerDecode(TP70_String Str);
  bool BoolIfer(TP70_String Str);
  void ChangeAllsVariables(TP70_String MStr);
  void ChangeAllsSignAndSaves(TP70_String S, char Ch);
  void CountAllsOperand(TP70_String S, float R);
};                                  //+

class MLRepeat                      //+
{                                   //+
public:                             //+
  int i;                            //+
  int Activ;
  TP70_String RLabel;
};                                  //+

class MLRep : public ThisProgram    //+
{                                   //+
public:                             //+
  MLRepeat RBuffer[BufSize+1];    
  int Init(TP70_String S);
  bool Done(TP70_String S);
  void ClearList();                 //+
};                                  //+

Субмодуль 1.

class MMemory : public ThisProgram  //+
{                                   //+
public:                             //+
  MyVar* Variables[StackSize+1];
  int NewVar(TP70_String Name, TP70_String NVType, MyVar EQU);
  int NewType(TP70_String Name, int Size, MType List);
  int NewClass(TP70_String Name, int Size, MClass List);
  int ReWStack(TP70_String Name, TP70_String NVType, MyVar EQU);
  void FindInMemory(TP70_String Name, MFinder F);
  void FindInBuffer(TP70_String Name, BFinder F);
  void ClearMem();                  //+
};                                  //+

MMemory* MLMemory;
COMMAND* C;
MLEQUs*  EQUs;
MLRep*   MLR;

Субмодуль 2.

GString COMMAND::GetLastCommand()
{
        int i = 1; //+
        while(Buffer!="")
        { //+
              i++; //+
        }; //+
        i = i - 2; //+
GetLastCommand = Buffer;
}

Субмодуль 3.

GString COMMAND::GetNLastCommand(int N)
{
        int i = 1; //+
        while(Buffer!="")
        { //+
              i++; //+
        }; //+
        if(N>BufSize-2) //+
        { //+
           GetNLastCommand = "КОММАНДА УТЕРЕНА(Buffer=100) (N>98)!";
        } else //+
        { //+
           N++; //+
           i = i - N; //+
           GetNLastCommand = Buffer;
        }; //+
        if(N>BufSize-2) //+
        { //+
           ErrMsg = "КОММАНДА УТЕРЕНА(Buffer=100) (N>98)!";
        }; //+
}

Продовження за адресою :

http://beloshenko.ucoz.ru/publ/2-3-0-60


Мітки: beloshenko, mlmp, programs
Коментар: 4 Переглядів: 247 [Історія змін] Розмір:5747 байт
Останні зміни зроблені: beloshenko Микита Бєлошенко 318 дні(в) тому 11.07.2011 22:48:55
ДодавТекст

beloshenko Надіслати повідомлення
Микита Бєлошенко
Інші субмодулі.
318 дні(в) тому 11.07.2011 21:23:35 Цитата('609011','609011','7','1939')">Повідомити про спам

Субмодуль 4.

int COMMAND::RunLabel(TP70_String Str)
{
    int i; //+
    int L; //+
    L = Str.Length(); //+
    TP70_Delete(Str,1,1);
    TP70_Delete(Str,L,1);
    i = 0; //+
       while((TP70_Pos("{",Buffer [ i ])!=1)||(TP70_Pos(Str,Buffer [ i ])!=2))
{ //+
i++; //+
}; //+

    RunLabel = i-1; //+
}

Субмодуль 5.

int COMMAND::cEQUDecode(TP70_String MLT, TP70_String S, MyVar EQU)
{
Pointer P;
GetMem(P,SizeOf(EQUs));
FreeMem(P,SizeOf(EQUs));
cEQUDecode = EQUs->EQUDecode(MLT,S,EQU);
}


Субмодуль 6.

// Clearing of the array Buffer.
void COMMAND::ClearBuffer() //+
{ //+
int i; //+
for(i=1; i < = BufSize; i++) //+
{ //+
Buffer [ i ] = "";
}; //+
}

Субмодуль 7.

void COMMAND::SetCommandLine(TP70_String Str)
{ //+
int i = 1; //+
while(Buffer [ i ] !="")
{ //+
i++; //+
}; //+
if(i==BufSize+1) //+
{ //+
ReWriteBuffer(Str);
} else //+
{ //+
Buffer [ i ] = Str;
}; //+
}

beloshenko Надіслати повідомлення
Микита Бєлошенко
Інші субмодулі (продовження).
318 дні(в) тому 11.07.2011 21:40:49 Цитата('609011','609011','7','1940')">Повідомити про спам

Субмодуль 8.

void COMMAND::ReWriteBuffer(TP70_String Str)
{
int i; //+
for(i=1; i < = BufSize-1; i++) //+
{ //+
Buffer[ i ] = Buffer[ i+1 ];
}; //+
Buffer[ i+1 ] = Str;
}

Субмодуль 9.

void COMMAND::RunBuffer() //+
{ //+
int i; //+
NumRC = 1; //+
new(MLR);
MLR->ClearList(); //+
new(EQUs);
while(TP70_Pos(cmExit,Buffer[NumRC])==0)
{
i = NumRC; //+
RunCommand(Buffer[ i ]); //+
MLGotoCommand(Buffer[ i ]); //+
MLForCommand(Buffer[ i ]); //+
MLWriteForIntoX(Buffer[ i ]); //+
MLExitWithFor(Buffer[ i ]); //+
MLIfCommand(Buffer[ i ]); //+
MLProcedureCommand(Buffer[ i ]); //+
MLFunctionCommand(Buffer[ i ]); //+
MLTypeCommand(Buffer[ i ]); //+
MLObjectCommand(Buffer[ i ]); //+
MLConstCommand(Buffer[ i ]); //+
MLVarCommand(Buffer[ i ]); //+
NumRC++; //+
if(NumRC>BufSize) //+
{ //+
NumRC = 1; //+
Buffer[NumRC] = cmExit;
}; //+
};
}


Субмодуль 10.

void COMMAND::RunCommand(TP70_String Str) //+
{ //+
     TP70_WriteLn(Str); //+
}

Субмодуль 11.

void COMMAND::MLGotoCommand(TP70_String Command)
{
int i,di; //+
int Len; //+
int i1,j1; //+

TP70_String SGoto; //+
TP70_String SL; //+

SGoto = "";
i = TP70_Pos(cmGoto,Command);
if(i!=0) //+
{ //+
Len = Command.Length(); //+
SGoto = TP70_Copy(Command,i,Len);
i1 = TP70_Pos("[",SGoto);
j1 = TP70_Pos("]",SGoto);
di = TP70_IABS(i1-j1); //+
SL = TP70_Copy(SGoto,i1,di);
NumRC = RunLabel(SL); //+
}; //+
}

Субмодуль 12.

void COMMAND::MLForCommand(TP70_String Command)
{
int i = 0, i1 = 0, j1 = 0; // +
int Number = 0; // +

TP70_String S1,S2;

if(TP70_Pos(cmRepeat,Command)!=0)
{
S1 = "";

i1 = TP70_Pos("[",Command);
j1 = TP70_Pos("]",Command);
j1 = TP70_IABS(i1-j1); //+
S1 = TP70_Copy(Command,i1+1,j1-1);
S2 = "";
for(i=1; iRBuffer[ i ].RLabel)!=0)
{ //+
S2 = "Старый";
Number = i; //+
MLR->RBuffer[Number].i++;
}; //+
}; //+
if(S2=="")
{
Number = MLR->Init(S1);
if(MLR->RBuffer[Number].Activ==1)
{
C->NumRC = C->RunLabel("["+S1);
};
};
};
}

Субмодуль 13.

void COMMAND::MLWriteForIntoX(TP70_String Command)
{
int k; //+
int i1 = 0; //+
int j1 = 0; //+
int i = 0; //+
int j = 0; //+
int i2 = 0; //+
int j2 = 0; //+

TP70_String S1; //+
TP70_String S2; //+

S1 = "";
S2 = "";
if(TP70_Pos(cmWrForX,Command)!=0)
{
i1 = TP70_Pos("(",Command);
j1 = TP70_Pos(")",Command);
j1 = TP70_IABS(i1-j1); //+
S1 = TP70_Copy(Command,i1+1,j1-1);
i2 = TP70_Pos("[",Command);
j2 = TP70_Pos("]",Command);
j2 = TP70_IABS(i2-j2); //+
S2 = TP70_Copy(Command,i2+1,j2-1);

for(i=1; i < = StackSize; i++) //+
{ //+
if(TP70_Pos(S1,MLMemory->Variables[ i ]^.Name^)==1)
{ //+
j = i; //+
}; //+
}; //+

i = 0; //+

for(i=1; i < = BufSize; i++) //+
{ //+
if(MLR->RBuffer[ i ].RLabel==S2)
{ //+
k = i; //+
}; //+
}; //+

i = 0; //+

MLMemory->Variables[j]->I^ = MLR->RBuffer[k].I;
MLMemory->Variables[j]->R^ = MLR->RBuffer[k].I;
};
}

Субмодуль 14.

void COMMAND::MLExitWithFor(TP70_String Command)
{
int i = 0; //+
int j = 0; //+
int i1 = 0; //+
int j1 = 0; //+
int i2 = 0; //+
int j2 = 0; //+

bool Activ; //+

TP70_String S1,S2; //+

S1 = "";
S2 = "";
Activ = false; //+
if (TP70_Pos(cmExWFor,Command)!=0)
{
i1 = TP70_Pos("(",Command);
j1 = TP70_Pos(")",Command);
j1 = TP70_IABS(i1-j1); //+
S1 = TP70_Copy(Command,i1+1,j1-1);
i2 = TP70_Pos("[",Command);
j2 = TP70_Pos("]",Command);
j2 = TP70_IABS(i2-j2); //+
S2 = TP70_Copy(Command,i2+1,j2-1);
Activ = EQUs->BoolIfer(S1);
if(Activ) //+
{ //+
Activ = MLR->Done(Command);
}; //+
};
}

Субмодуль 15.

void COMMAND::MLIfCommand(TP70_String Command) //+
{ //+
} //+

void COMMAND::MLProcedureCommand(TP70_String Command) //+
{ //+
} //+

void COMMAND::MLFunctionCommand(TP70_String Command) //+
{ //+
} //+

void COMMAND::MLTypeCommand(TP70_String Command) //+
{ //+
} //+

void COMMAND::MLObjectCommand(TP70_String Command) //+
{ //+
} //+

void COMMAND::MLConstCommand(TP70_String Command) //+
{ //+
}

Субмодуль 16.

void COMMAND::MLVarCommand(TP70_String Command)
{
int i,Len; //+
int i1,j1; //+
int i2,j2; //+
int i3,j3; //+
int d1,d2,d3; //+

int Logik; //+
int Number; //+

TP70_String S1,S2,S3; //+
TP70_String S,Name,MLType; //+

MyVar MyEQU; //+

i = TP70_Pos(cmVar,Command);

if (i!=0) //+
{ //+
i1 = TP70_Pos("+",Command);
j1 = TP70_Pos("-",Command);

i2 = TP70_Pos("[",Command);
j2 = TP70_Pos("]",Command);

i3 = TP70_Pos("(",Command);
j3 = TP70_Pos(")",Command);

d1 = TP70_IABS(i1-j1); //+
d2 = TP70_IABS(i2-j2); //+
d1 = TP70_IABS(i2-j2); //+

S = Command;
S1 = TP70_Copy(S,i1,d1);
Name = S1;

S2 = TP70_Copy(S,i2,d2);
S3 = TP70_Copy(S,i3,d3);

i1 = TP70_Pos("+",S1);
j1 = TP70_Pos("-",S1);
d1 = TP70_IABS(i1-j1); //+
Name = TP70_Copy(S1,i1+1,d1-1);
MLType = S2;

TP70_Delete(MLType,1,1);

Len = MLType.Length(); //+
Logik = cEQUDecode(MLType,S3,MyEQU);
Number = MLMemory->NewVar(Name,MLType,MyEQU);
}; //+
}

Субмодуль 17.

int MMemory::NewVar(TP70_String Name, TP70_String NVType, MyVar EQU)
{
TP70_String S; //+
int i = 1; //+

while(MLMemory->Variables->Name^!="")
{ //+
i++; //+
}; //+

if(i>StackSize) //+
{ //+
NewVar = ReWStack(Name,NVType,EQU);
} else //+
{ //+

MLMemory->Variables[ i ]->Name^ = Name+" {"+NVType+"}";

NewVar = i;
S = NVType;

if(S==cmReal)
{
new(MLMemory->Variables[ i ]->R);
MLMemory->Variables[ i ]->R^ = EQU.R^;
};
if(S==cmInteger)
{
new(MLMemory^.Variables[ i ]->I);
MLMemory->Variables[ i ]->I^ = EQU.I^;
};
if(S==cmString)
{
new(MLMemory->Variables[ i ]->S);
MLMemory->Variables[  i ]->S^ = EQU.S^;
};
if(S==cmChar)
{
new(MLMemory->Variables[ i ]->C);
MLMemory->Variables[ i ]->C^ = EQU.C^;
};
};
}

Субмодуль 18.

int MMemory::NewType(TP70_String Name, int Size, MType List) //+
{ //+
} //+

int MMemory::NewClass(TP70_String Name, int Size, MClass List) //+
{ //+
} //+

Субмодуль 19.

void MMemory::ClearMem() //+
{ //+
int i; //+
Pointer P;

New(MLMemory);
for(i=1; i < = StackSize; i++) //+
{ //+
new(MLMemory->Variables[ i ]);
new(MLMemory->Variables[ i ]->Name);
MLMemory->Variables[ i ]->Name^ = "";
GetMem(P,SizeOf(MLMemory->Variables[ i ]));
FreeMem(P,SizeOf(MLMemory->Variables[ i ]));
}; //+
} //+

Субмодуль 20.

int MMemory::ReWStack(TP70_String Name, TP70_String NVType, MyVar EQU)
{
int i;
TP70_String S;

for(i=1; i< = StackSize-1; i++)
{
MLMemory->Variables[ i ]^ = MLMemory->Variables[ i+1 ]^;
};

ReWStack = StackSize;
i = StackSize;

MLMemory->Variables[ i ]->Name^ = Name+" {"+NVType+"}";

S = NVType;

if(S==cmReal)
{
new(MLMemory->Variables[ i ]->R);
MLMemory->Variables[ i ]->R^ = EQU.R^;
};
if(S==cmInteger)
{
new(MLMemory->Variables[ i ]->I);
MLMemory->Variables[ i ]->I^ = EQU.I^;
};
if(S==cmString)
{
new(MLMemory->Variables[ i ]->S);
MLMemory->Variables[ i ]->S^ = EQU.S^;
};
if(S==cmChar)
{
new(MLMemory->Variables[ i ]->C);
MLMemory->Variables[ i ]->C^ = EQU.C^;
};
}

Субмодуль 21.

void MMemory::FindInMemory(TP70_String Name, MFinder F)
{
int i; //+
for(i=1; i < = StackSize; i++) //+
{ //+
if(TP70_Pos(Name,MLMemory->Variables[ i ]->Name^)!=0)
{ //+
F[ i ] = 1; //+
} else //+
{ //+
F[ i ] = 0; //+
}; //+
}; //+
}

Субмодуль 22.

void MMemory::FindInBuffer(TP70_String Name, BFinder F)
{
int i; //+
for(i=1; i < =BufSize; i++) //+
{ //+
if (TP70_Pos(Name,C->Buffer[ i ])!=0)
{ //+
F[ i ] = 1; //+
} else //+
{ //+
F[ i ] = 0; //+
}; //+
}; //+
}

beloshenko Надіслати повідомлення
Микита Бєлошенко
Інші субмодулі (продовження).
318 дні(в) тому 11.07.2011 22:39:57 Цитата('609011','609011','7','1941')">Повідомити про спам

Субмодуль 23.

int MLEQUs::EQUDecode(TP70_String MLT, TP70_String S, MyVar EQU)
{
int i,L; //+
int i1,j1; //+
char Ch; //+

MFinder B;

if(TP70_Pos(cmEQUid,S)!=0)
{
TP70_Delete(S,1,1);
L = S.Length();
TP70_Delete(S,L,1);
i = TP70_Pos(cmEQUid,S);
TP70_Delete(S,i,2);
if(MLT==cmChar)
{
new(EQU.C);
Ch = S[1];
EQU.C^ = Ch;
};
if(MLT==cmString)
{
new(EQU.S);
EQU.S^ = S;
};
if(MLT==cmReal)
{
new(EQU.R);
EQU.R^ = RealDecode(S);
};
if(MLT==cmInteger)
{
new(EQU.I);
EQU.I^ = IntegerDecode(S);
};
};
if(TP70_Pos(cmvEQUid,S)!=0)
{
TP70_Delete(S,1,1);
L = S.Length();
TP70_Delete(S,L,1);
i = TP70_Pos(cmvEQUid,S);
TP70_Delete(S,i,1);
MLMemory->FindInMemory(S,B);
for(i=1; i < = StackSize; i++)
{
if(B[ i ]==1)
{
if(MLT==cmChar)
{
new(EQU.C);
EQU.C^ = MLMemory->Variables[ i ]->C^;
};
if(MLT==cmString)
{
new(EQU.S);
EQU.S^ = MLMemory->Variables[ i ]->S^;
};
if(MLT==cmReal)
{
new(EQU.R);
EQU.R^ = MLMemory->Variables[ i ]->R^;
};
if(MLT==cmInteger)
{
new(EQU.I);
EQU.I^ = MLMemory->Variables[ i ]->I^;
};
};
};
};
}

Субмодуль 24.

float MLEQUs::RealDecode(TP70_String Str)
{
int L,L1,i,j; //+
float Result = 0; //+

float RRes,St; //+

L = TP70_Pos(".",Str)-1;

for(i=1; i < = L; i++) //+
{ //+
j = Ord(Str[ i ])-48;
Result = Result*10+j; //+
}; //+

St = 1; //+
RRes = 0; //+
L1 = Str.Length(); //+
L = TP70_Pos(".",Str)+1;

for(i=L; i < = L1; i++) //+
{ //+
St = St*10; //+
j = Ord(Str[ i ])-48;
RRes = RRes+j/St; //+
}; //+

Result = Result + RRes; //+
return Result; //+
}

Субмодуль 25.

int MLEQUs::IntegerDecode(TP70_String Str) //+
{ //+
int L,i,j; //+
int Reault = 0; //+

L = Str.Length(); //+

for (i=1; i < = L; i++) //+
{ //+
j = Ord(Str[ i ])-48;
Result = Result*10+j; //+
}; //+

return Result; //+
} //+

Субмодуль 26.

bool MLEQUs::BoolIfer(TP70_String Str);
{
int i; //+
bool Test; //+
char ch; //+

ChangeAllsVariables(Str);
ChangeAllsSignAndSaves(Str,Ch);
CountAllsOperand(Str,i);
if ((i > 0)&&(Ch==cmbRight))
{ //+
Test = true; //+
}; //+
if ((i==0)&&(Ch==cmvEQUid))
{ //+
Test = true; //+
}; //+
if ((i < 0)&&(Ch==cmbLeft))
{ //+
Test = true; //+
}; //+
}

Субмодуль 27.

void MLEQUs::CountAllsOperand(TP70_String S, float R) //+
{ //+
} //+

Субмодуль 28.

void MLEQUs::ChangeAllsSignAndSaves(TP70_String S, char Ch)
{
TP70_String S1;
int j = 0, i = 0; //+
int L = 0; //+
int Position = 0; //+

bool Sign; //+

S1 = "";

Sign = false; //+

L = S.Length(); //+
Ch = Chr(0);

for(i=1; i < = L; i++)
{
if ((S[ i ]== " > ")||(S[ i ]== " = " )||(S[ i ]== " < "))
{
Ch = S[ i ];
Position = i; //+
Sign = true; //+
};
};

i = Position; //+
j = TP70_IABS(L-i); //+
S1 = TP70_Copy(S,i+1,j);
S1 = "-("+S1+")";
TP70_Delete(S,i,j+1);

S = S + S1; //+
}

beloshenko Надіслати повідомлення
Микита Бєлошенко
Субмодулі - продовження.
318 дні(в) тому 11.07.2011 22:48:55 Цитата('609011','609011','7','1942')">Повідомити про спам

Субмодуль 29.

int MLRep::Init(TP70_String S)
{
int i = 0, j = 0; //+

TP70_String Detect; //+

Detect = "";

for (j=1; j < = BufSize; j++) //+
{ //+
if(MLR->RBuffer[ i ].RLabel.Length()>12)
{
MLR->RBuffer[ i ].RLabel = "";
};
if(MLR->RBuffer[ i ].RLabel == S)
{
Detect = "Найден!";
Init = j; //+
MLR->RBuffer[j].i++;
MLR->RBuffer[ i ].Activ = 1;
};
}; //+

if (Detect== "")
{
i = 1; //+
while(MLR->RBuffer[ i ].RLabel!= "")
{ //+
i++; //+
}; //+
if(i>BufSize) //+
{ //+
for(j=1; j < = BufSize-1; j++) //+
{ //+
MLR->RBuffer[ i ].i = MLR->RBuffer[ i+1 ].i;
MLR->RBuffer[ i ].Activ = MLR->RBuffer[ i+1 ].Activ;
MLR->RBuffer[ i ].RLabel = MLR->RBuffer[ i+1 ].RLabel;
}; //+
}; //+
MLR->RBuffer[ i ].RLabel = S;
MLR->RBuffer[ i ].Activ = 1;
MLR->RBuffer[ i ].i = 1;
Init = i; //+
};
}

Субмодуль 30.

bool MLRep::Done(TP70_String S)
{ //+
     int i; //+
} //+

Субмодуль 31.

void MLRep::ClearList()
{
     int i; //+
     for(i=1; i < = BufSize; i++) //+
     { //+
         MLR->RBuffer[ i ].i = 0;
         MLR->RBuffer[ i ].Activ = 0;
         MLR->RBuffer[ i ].RLabel = "";
     }; //+
}
 
 
Ім'я Пароль
розширений... ( / Реєстрація )

Тема

В тексті можна використовувати Wiki або HTML теги




 
Хто на сайті?
 
Анонімні: 6, Зареєстровані: 0 (?)
Скарга | Розміщено на MyLivePage | | Design by Drive | © Kolobok smiles, Aiwan