Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - monliv

Pages: [1]
Astrobasic / Re: create a temporary file
« on: September 13, 2020, 06:21:26 PM »
very very well, it's very fast thanks :)

Astrobasic / Re: create a temporary file
« on: September 12, 2020, 11:34:04 AM »
Tell me if memget / memread etc.  is more powerful than strlist.
In that case, if you write a memsearch command, which looks for a string in memory could be very useful.
The script is already written.

Astrobasic / Re: create a temporary file
« on: September 11, 2020, 06:42:12 PM »
if (strlist(12, s, 0) = -1)
    strlist(3, s, 0);` not found, add it
    ` found
    i=i; <<<<<<<<<<<<
    to rewrite how it works? I do not understand.
i = i says nothing,
I prepare the string, then what do I do?
maybe it's very easy, but I need a complete example.

Astrobasic / Re: create a temporary file
« on: September 07, 2020, 06:20:39 PM »
I've only seen now, that you have added a new function to strlist.
12 search the list for 's', returns -1 when not found, else the index.

I try it.

Astrobasic / Re: create a temporary file
« on: September 07, 2020, 05:59:49 PM »
The record consists of 4 fields.
a) 0-9 chi2 (numeric)
b) 10-20 string (alphanumeric) that collects 4 numbers (for example: planet 1 + planet2 + aspect + other number)
c) 31-10 counted
d) 41-10 expected
So I compose these values taken from the reading of a theme.
reading the next record I go to see if this value already exists.
If I find I add 1 to the counted field otherwise I write
a new line in the file.

Astrobasic / Re: create a temporary file
« on: September 07, 2020, 04:54:19 PM »
Here I'm going to look for a string in memory.
if the searched string is already present i add 1 to counted
and rewrite it
otherwise I simply write it.


ii = 0; for (ii < count)
            memval(0, ii, &s);
            nm = split(s, s1, ',');
            c1b   =  numstr(s1[1]);
            c2b   =  numstr(s1[2]);
            c3b   =  numstr(s1[3]);
            c4b   =  numstr(s1[4]);
            strset(pr1, "%d,%d,%d,%d",c1b,c2b,c3b,c4b);
            if (TRUE = strcmp(p1, pr1))
             contati   =  numstr(s1[5])+ 1;
             div =  numstr(s1[6]);
             strset(s, "%9s,%d,%d,%d,%d,%8d,%d",chi2s,c1,c2,c3,c4,contati,div);
             memwrite(0, ii, &s);
             ii = count;`if found rewrite and exit
`if not found write and exit
   contati = 1;
   strset(s, "%9s,%d,%d,%d,%d,%8d,%d",chi2s,c1,c2,c3,c4,contati,div);
   memwrite(0, count, &s);
   count += 1;

Already with 50 themes it becomes very very slow
in reading and writing.
maybe there is a search function or a index on file
that speeds up a lot ?

Astrobasic / search quickly a string
« on: September 07, 2020, 01:31:30 PM »
the linewrite command is fine to manage a file,
we also tried strlist () with the birtdays example, but we don't solve.
we need to search quickly for a string in a file or in memory.
If we find it, we add 1 in a numeric field that we call
counter and rewrite, otherwise we append the string, and write 1 in the same counter.
in the 'find' program use the command strcmp (t, s) = 1

All this is useful, because we do not start from pre-established aspects,
but we will count the frequencies that are gradually formed in the themes, that we are going to deepen.

Astrobasic / create a temporary file
« on: September 01, 2020, 07:04:05 PM »
greetings to all.
I try to ask for help to solve a problem on a module we would like to create.

the problem is not selecting a database and scrolling through the data
but temporarily stores the resulting data from each theme on a temporary array / file.
increasing a total to snap to the detected aspect string
sun at 13 from mercury I would like to write
0 (sun), 13 (asp), 3 (mercury), 1 (total readings)
obviously if the data is already present
0 (sun), 13 (asp), 3 (mercury), 2 (total readings)

at the end of the reading, obviously sort the table and
put everything on a file.

This last part we should be able to do it ourselves.
with other languages ​​I would use an indexed file which
I would increase as I add data.

Pages: [1]