Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fine

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fine

#1 Post by Eugene Lutsenko »

Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fine. I understand that there are problems with variables and objects, but I can't solve them. It seems like some objects remain open after the 1st function and I can't make them local or close them. Maybe there is some general way to do this?
Attachments
Безымянный.jpg
Безымянный.jpg (67.88 KiB) Viewed 5252 times

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fi

#2 Post by rdonnay »

You need to learn to write code using LOCAL variables. This way no function can affect any other function.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fi

#3 Post by Eugene Lutsenko »

rdonnay wrote: Thu Dec 08, 2022 8:11 am You need to learn to write code using LOCAL variables. This way no function can affect any other function.
Hi, Roger! I'm very glad to hear from you. I will try. Health to you!

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fi

#4 Post by Eugene Lutsenko »

And yet... why can such an error occur? And ONLY after running the function F3_5() after the function A2_3_2_2()? Full up-to-date source code of the system: http://lc.kubagro.ru/__AidosALL.txt

Code: Select all

oSay98:SetCaption(Mess98);oSay98:SetCaption(oSay98:caption)
Maybe it is possible to save the state of the environment (all memory variables and active objects) before running the F2_3_2_2() function, and then restore the state of the environment after exiting it? Something like this:

Code: Select all

   ****************************
   ***** Запустить 2.3.2.2, 3.5
   ****************************

   mApplName = mApplName +"'"       // Создать приложение с темже именем, что у текущего, но с добавлением одинарной ковычки     <<<===##################

*  aSave_api2322 := DC_DataSave()   // Сохранение вычислительной среды (открытые и текущие БД и индексы)

   F2_3_2_2("","")                  // Запуск универсального программного интерфейса с внешними базами данных

*  DC_DataRest( aSave_api2322 )     // Восстановление вычислительной среды (открытые и текущие БД и индексы)

*  Возникает ошибка в отображении хода исполнения. Так и не смог разобраться. Похоже надо восстанавливать среду исполнения       <<<===##################

   F3_5('CPU','SintRec','3.5','ALL')       // Какая модель?
Attachments
Безымянный.jpg
Безымянный.jpg (74.51 KiB) Viewed 5191 times

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Running the 2nd function after the 1st one gives an error, and running the 2nd function without the 1st one works fi

#5 Post by Eugene Lutsenko »

hi! Dear colleagues!

I ask you to help solve the problem of running the function F3_5() after running the function F2_3_2_2(). I made a very good 3.6 mode: "Detection, removal and typing of artifacts", which has to be partially done manually because of this problem. Slobodan! Maybe you can help?

The current full project of the Eidos-pro system (Alaska+Express+ADS) in the attached archive. I removed only the name and password of access to the ftp server of the Eidos system.
Attachments
project_AIDOS-Xpro.zip
(1.3 MiB) Downloaded 338 times




Post Reply