New Version: 2018.02.12 1.4.1.13441
|
02-25-2018, 09:51 AM
Post: #42
|
|||
|
|||
RE: New Version: 2018.02.12 1.4.1.13441
(02-22-2018 06:55 PM)toml_12953 Wrote: OK, I can live without the pointers but what I really want is user-defined datatypes (structures or records). They make the code so much cleaner. Yes I see what you mean. I did not use the hp prime app intensively yet but one of my todos (of an endless list) is to make a library for records using lists. I successfully tested a list of lists can handle 1 million entries. The need is to write a framework around the idea. (I would say that trying to achieve something advanced with a simpler language is also fun, although during the execution the overhead may be massive) Then Han below gave us (and especially me, as I did not perused the possibilities of the Prime too much yet) maybe a better solution, aside from the lists of list, using apps and the structure. I am not a fan of cluttering the app view, but if there is a way to keep Apps used as "records" aside from the real Apps, then why not. Also another problem with my idea above, is that I need to use an existing datatype (list of lists) to save it if different functions wants to create a new record. If I use a custom datatype that is somehow statically hold in a program, then every time the program is called the function has to clean up the previous run while the last function may need to somehow save the result. Hence sticking with flexible internal datatypes is a bit better, as they allow to be stored easily. I am not sure, though, whether programs, apps, notes are stored on the persistent storage while the current execution stays in RAM, or everything is stored on the persistent storage when the calculator/app goes off. (02-22-2018 08:20 PM)Han Wrote: Create your own custom 'store' and 'recall' functions that handle the data types you need. For example, you can create a RECSTO(record, recnum, label, value) function and RECRCL(record, recnum, label) to return the desired value. (02-22-2018 08:33 PM)Han Wrote: If you have a collection of different "structures" for records, you can declare them with constants: Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)