Array in an array - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Array in an array (/showthread.php?tid=1476) |
RE: Array in an array - madscijr - 03-03-2023 Check this out, I was googling for any examples of using split & join to implement nested arrays and even nested JavaScript objects in a procedural langauge like QB, and ran across this. Do any of the old timers recall what OO features Galleon was considering adding to QB64 (without as they say, mutilating the language)? https://www.tapatalk.com/groups/qbasic/object-orientation-in-qb64-t36905.html RE: Array in an array - vince - 03-03-2023 I mean, I wouldnt say PE is mutilating the language..? RE: Array in an array - SpriggsySpriggs - 03-03-2023 Poor NasaCow. I think this thread is going in a direction of hijacking. He wants to manage a student gradebook database (which is why I mentioned SQL) and now we're talking about JSON objects, REST API, and posts from 2012. P.S. If a program will be used by a client/company and your code is full of all handwritten ways of dealing with their stuff, anyone who has to pick up where you left off later will be very confused. Such is the issue with many companies that do "in-house EDI", for instance. They write up all these solutions for handling EDI documents that take a crazy amount of lines and is not flexible at all, requiring a different set of code for each EDI partner. If they use an EDI parser library written in standard .NET with all the proper practices, anyone who shows up to replace the programmer can continue where they left off without having to step line by line through the code trying to figure out what the heck was going on. I have had to do this. Three times now. It's not fun. Writing up all these new ways of handling this stuff might be a "fun challenge" to the original programmer but is a giant pain in the ass for anyone else. RE: Array in an array - TempodiBasic - 03-11-2023 (02-17-2023, 05:43 PM)Balderdash Wrote: Obligatory MySQL/SQLite suggestion. That is a good tool well olied and ready to start. In this case I think that the will of NasaCow is in reinventing the wheel at his customized needs... just like to say I have an optimun library for database but I want handwrite something with thousand of lines by myself. BUT array in array is not need to manage so kind of database (Gradebook). RE: Array in an array - TempodiBasic - 03-11-2023 (02-28-2023, 06:24 PM)madscijr Wrote:(02-28-2023, 03:33 PM)Kernelpanic Wrote: There is a small error in the first code on the page. Thats how it works: Althought the demo is interesting, it is so poor in aspects that is very far away from a dictionary while the hash setting is quiet good. As you can see playing with the function/subroutines of hash array, the dictionary has been projected to have no duplicating of hash value, and to have one value for each hash value, this is very far from a dictionary where you can have a list of values associated with the hash value. (look at Bplus implementation of dictionary that is on the past forum and on Rosetta Code under the voice QB64 dictionary or associative arrays). So to get a real dictionary from this first skeleton demo the function SetValue must have the managment of adding new value in tail (or ordered by value/character ) , so the same for removing (cancel) from the set of values associated to the hash value. Indeed now this demo add the same hash key in a following cell of array, but this last is really unreached because the GetValue function returns only the first match with the hash value researched. But with some modifications it is possible to get back a real dictionary with functions of storing, changing and cancelling the values associated to the hash value. ... but I think that is better the dictionary made by Bplus. RE: Array in an array - mnrvovrfc - 03-11-2023 I should be the one complaining. But I don't. Because I'm making another post which is off-topic here. While QB64 was up to Galleon to improve, it must have started with allowing a subprogram written by an user to omit a parameter "in the middle" or at the end. Something that required an "IsMissing()" that I discovered in OpenOffice.org BASIC, or which required that "va_list" junk from C library. I'm going with what I read somewhere in the Wiki in the past. What I said about the hash tables was something I discovered in the BASIC portion of the QB64 source code. But that's ready and waiting to be used for whoever could sort out that mess. RE: Array in an array - NasaCow - 03-13-2023 (02-18-2023, 09:25 PM)TempodiBasic Wrote: @NasaCow That's the full blown version, I am going more for the gradebook local client than the web version. I was more worried about setting up all the files and info before I went to programming the actual gradebook. But I am doing a code rewrite to cleanup a lot of my mess (I program without a plan, just an idea so sometimes I need to stop and rewrite sections, like I teach my little writers!) This is more what I am heading towards: different assignmet types, different point totals, color coding. I have a lot to do still but I will finish it *someday* upload picture url (03-01-2023, 04:00 PM)bplus Wrote: You folks have sure wandered far from the main subject problem of OP. Sure has but it has been an amazing read with a lot of different ideas and suggestions and discussions. I am sad I haven't been around for a few months. Things are finally starting to settle down so I hope to get back to one of my joys, programming and sharing RE: Array in an array - TempodiBasic - 04-02-2023 Hi NasaCow that image has no good focus! but now I have got it! It is at this link PowerBook Teacher Gradebook Tabs RE: Array in an array - NasaCow - 04-06-2023 (02-18-2023, 09:25 PM)TempodiBasic Wrote: @NasaCow (04-02-2023, 10:14 PM)TempodiBasic Wrote: Hi NasaCow Sorry about that, I thought I capture a high-res picutre but I may have been mistaken. I have been busy coding, did a ground up rewrite of many subs (at least the functions were still useful). It is more flexible, I am hoping to release something sooner than later. I am just trying to get back to where I was before I share though! RE: Array in an array - TempodiBasic - 04-12-2023 (04-06-2023, 02:37 AM)NasaCow Wrote:(02-18-2023, 09:25 PM)TempodiBasic Wrote: @NasaCow Waiting your application, I am going to develope a demonstration application very close to PowerTeacher GradeBook structure of data and with an all in one file of data . Good Luck on reinventing the report language for getting back the reports with data. |