Post Reply 
Where can I place a code in app’s program, which will be executed just once?
09-14-2016, 07:52 AM
Post: #1
Where can I place a code in app’s program, which will be executed just once?
Hello All,
I am very new user of HP Prime. And my questions regarding a basic program structure for app are maybe trivial… Not for me:-) My first standalone program (not for app) works fine, so I have decided to rewrite into function based app.

The code handling user's selections must be only placed between BEGIN and END under some created VIEW. See the example below. Sub-routines are placed out of VIEW's declaration and called out from VIEW's section (also, function of VIEW can be called out as sub). All VIEWs are easily accessible by the user (VIEW key and its selection). Where can I place a code in app’s program, which will be executed just once? For example, loading of init. constants after launching of app. Need some info "App just launched"... At this moment, my constants are always refreshed (sub INIT_DATA()) when user selects “Info”. But it is not necessary. Easy to do in standalone program…

My second question. How can I disable selected VIEW’s option? To be temporarily not accessible to the user.
Thank you for reply in advance.
Best regards,
Pavel

VIEW "Info",START()
BEGIN
RECT_P();
INIT_DATA();
.
.
END;

INIT_DATA();
BEGIN
.
.
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Where can I place a code in app’s program, which will be executed just once? - Pavel OK1DNZ - 09-14-2016 07:52 AM



User(s) browsing this thread: 1 Guest(s)