Just curious, but can't you use _PRINTSTRING instead of LP?
I have a problem to solve my program created in QB64.
bplus thanks
i tried to put with arrays
i'm going crazy you can give me a tip of how i can do it
also to improve it because I have to make it sum the numbers and I think it takes more variables to do this
example of sum would be so?
MID$(a, 5, 2) > 30 MID$(a, 15, 2) then color 4
but the variable a it is of type string it cannot be added up
any suggestions?
pity that I cannot understand the English languageWell that makes 2 of us!
Did I leave enough help for loading the file into an array?
Should we talk more about arrays?
did I understand that you don't speak English well?
Yes, but I was making a joke because English is my only language.
If you tell me your language I will use Bing to translate some of my words to yours (hopefully) and I might learn something too.
Code: QB64: [Select]
'Riempire una matrice con numeri da 1 a 20 'Caricare un array con numeri da 1 a 20 ' Fill = Riempire Caricare = Load an array with numbers from 1 to 20 ilMioArray(i) = i PRINT "visualizzare il mio array all'indietro 'show me the array backwards" PRINT "premere un tasto qualsiasi per continuare... press any key to continue... " PRINT "modificare il contenuto della mia matrice 'modify my array contents" ilMioArray(i) = ilMioArray(i) ^ 2 + 1 ' al quadrato piu (+) 1 'squared plus 1 GOSUB visualizzare: END ''''''''''''''''' don't go past here 'non andare passato qui visualizzare: PRINT "visualizzare 'display" PRINT "premere un tasto qualsiasi per continuare... press any key to continue... "
The next step is loading a file into an array.
Il passaggio successivo consiste nel caricamento di un file in una matrice.
Want to give it a try?
Vuoi fare un tentativo?
an array would be a variable containing more content
only variable that can hold multiple values
can I contain how many contents? is there a limit?
those on the right in the image what are they?
INPUT "Please tell me your name"; name1$
INPUT "Please tell me your name"; name2$
INPUT "Please tell me your name"; name3$
INPUT "Please tell me your name"; name4$
INPUT "Please tell me your name"; name5$
PRINT "Hello"; name1$; "," ; name2$; ","; name3$; ","; name4$; ","; name5$
DIM nam(1 TO 5) AS STRING
FOR I = 1 TO 5
INPUT "Please tell me your name"; nam(I)
NEXT
PRINT "Hello ";
FOR I = 1 TO 5
PRINT ","; nam(I);
NEXT
later you said to load a file into an array
how can i upload it?
One of the easiest ways for beginners to think of arrays is to think of them as variables with the same name, but different numbers.
Let's say I give you homework of: "Ask 5 people to enter their name, and then tell them all hello in a single uninterrupted sentence."
Now, you could go this route:Code: [Select]INPUT "Please tell me your name"; name1$
INPUT "Please tell me your name"; name2$
INPUT "Please tell me your name"; name3$
INPUT "Please tell me your name"; name4$
INPUT "Please tell me your name"; name5$
PRINT "Hello"; name1$; "," ; name2$; ","; name3$; ","; name4$; ","; name5$
OR, you could use an array to store the names.Code: [Select]DIM nam(1 TO 5) AS STRING
FOR I = 1 TO 5
INPUT "Please tell me your name"; nam(I)
NEXT
PRINT "Hello ";
FOR I = 1 TO 5
PRINT ","; nam(I);
NEXT
Now, with just 5 names, the code isn't very different in size or complexity, but change that to, "Get 500 people to give you their names"....
Arrays basically are nothing more than just a simple way to stick numbers to the end of variables, to allow for ease of mass handling them. name1, name2, name3, name4, name5, nameN all are handled in one simple DIM nam(1 TO N) statement. ;)
Code: QB64: [Select]
gives me an error where am I wrong I inserted the arrays wrong?
where am i wrong?
Hi Kiara87
fine exercise to write a lotto program.
about
can you be more specific?
In the bottom part of window of QB64 IDE there is a feedback message about the error? Or do you get error on runtime after pressing F5?
thanks for clearer informations
I leave the image as an attachment
putting this code gives me error inserting arrayCode: QB64: [Select]
'count lines in file contare le righe nel file 'PRINT a 'INPUT " OK enter "; w$ CLOSE #1 'now we know the size of the file so we are ready to DIM an array 'ora sappiamo la dimensione del file in modo da essere pronti a DIM un array CLOSE #1 'CLS: PRINT count '480 lines 'END 'CLS PRINT "BARI" PRINT "CAGLIARI" PRINT "FIRENZE" PRINT "GENOVA" PRINT "MILANO" PRINT "NAPOLI" PRINT "PALERMO" PRINT "ROMA" PRINT "TORINO" PRINT "VENEZIA" PRINT "NAZIONALE" PRINT " + to move on" PRINT "- to back" lineNum = 1 GOSUB get_a Q$ = INKEY$ GOSUB get_a REM bari REM cagliari REM firenze REM genova REM milano REM napoli REM palermo REM roma REM torino REM venezia REM nazionale _LIMIT 30 'this sub retrieves a line number from file the hard way get_a: num = 0 CLOSE #1
@bplus
great job to modularize the code!
I think that this can be a good help to kiara87 to see and to understand the tecnique behind this code.
More modular more flexible!
About italian translator... 6- in top rating 0-10, otherwise D in english rating.
I wanted to change the position where it prints the numbers I want to support them
The column numbers are aligned to the array numbers, don't change those because they access exact parts of the array lineDAT().
You can shift the numbers over in the print on screen by adding to LOCATE lines, the col part:
It is Locate Row, Col so maybe Col plus the amount you want to shift right say 20 characters
Set a variable called shiftRight = 20 will move text over 20 charactersCode: QB64: [Select]
Remember to do it in the other print section also.
Good to fiddle with numbers and maybe break once or twice or 20 times :-))
(Just remember to keep a backup)Code: QB64: [Select]
DIM Q$ ' for INKEY$ DIM shiftRight shiftRight = 20 'count lines in file ' debug check inputs from file 'PRINT a 'INPUT " OK enter "; w$ CLOSE #1 'now we now size of file so ready an array to load file Data CLOSE #1 ' NOW all the data if loaded into fileDAT() array, 480 strings of Lottory data GOSUB labelScreen 'set first line and get a data string from the FileDAT array lineNum = 1 a = fileDAT(lineNum) Q$ = INKEY$ 'get new data line a = fileDAT(lineNum) 'print out the data from the new line GOSUB labelScreen GOSUB screenDataLine GOSUB loadLineDAT_Mark30s _LIMIT 30 loadLineDAT_Mark30s: 'this loads the lineDAT array, so we can sweep through the columes and mark 30's rowCnt = 1: y = 1 rowCnt = rowCnt + 1 ' increase column if at 6 start new row screenDataLine: COLOR 15 aPlace = 5 aPlace = aPlace + 2 labelScreen: COLOR 15 ' setup screen labels for reporting data PRINT "BARI" PRINT "CAGLIARI" PRINT "FIRENZE" PRINT "GENOVA" PRINT "MILANO" PRINT "NAPOLI" PRINT "PALERMO" PRINT "ROMA" PRINT "TORINO" PRINT "VENEZIA" PRINT "NAZIONALE" 'some directions PRINT " + to move on"; PRINT "- to back"; DIM hi, lo diff30in90 = -1
I won't give up
Take any problem facing you, and you can break its solution down to those 3 steps (including life problems). Let's say I tell you, "Make me a peanut butter sandwich." How do you accomplish that task?
If it helps, Kiara, remember this -- All computer programming breaks down to 3 steps:
1) Step by step commands
2) Decision making
3) Repetition
Take any problem facing you, and you can break its solution down to those 3 steps (including life problems). Let's say I tell you, "Make me a peanut butter sandwich." How do you accomplish that task?
Get up.
Go in kitchen.
Get a knife.
Get bread.
Get peanut butter.
Open bread, remove a slice.
Put knife in peanut butter.
Remove knife from peanut butter.
Wipe knife on bread.
Put down knife.
Remove slice of bread from pack.
Place bread on bread.
And there's the biggest problem programmers usually face -- we think "fix a sandwich", and we do it. The computer has to have that instruction broken down step-by-step, to accomplish the same task... It's not the complexity of the problem that confound us; it's the simplicity of the computer.
Even with the above set of instructions, it's probably not enough for your pet robot to make that sandwich. "Get up" implies it was down somewhere. "Go in kitchen" is vague. From Where? How many steps? How many turns around corners, or up and down steps? Whose kitchen?
The trick is to break your problem down into smaller stages, and then see if there's a set of computer commands to fulfill those needs. If not, break those needs down smaller, until there are.
For example let's say I tell you to, "Print the contents of a file for me."
Breaking that order down to its components, we have to:
Choose a file.
Open that file.
Load the contents of that file in memory.
Print that file.
Repeat the last two steps until the whole file is printed.
Close the file.
Now, we have a basic step-by-step road map of how our program will look.
INPUT "Give me the name of the file you want to print ", filename$
OPEN filename$ FOR INPUT AS #1
DO
LINE INPUT #1, text$
PRINT text$
LOOP UNTIL EOF(1)
CLOSE #1
Take your complex problem and break it down to its step-by-step components. If you can do that, you can write your own computer programs.
LOL I do like simple things like Peanut Butter and Jelly sandwiches. Gots to have the jelly though!
I guess I like making things simple, certainly things presented simply. But what I really like is thinking of something and seeing it work on the computer screen. That sense of power overcomes all the tedium and frustration that comes from practice with Basic.
I've been working on Sudoku for way over a year, just to check and see if my advanced level puzzles generated from my program are both unique and solvable. I think I have unique but solvable, still uncertain about that one.
Tower of Hanoi is boring after you "get" what it takes to solve the puzzle, it's about 10 or 20 steps repeated over and over in a certain order, so easy for a human to loose track of that order and start going backwards again! 🤦♂️
you are my master idol
Salve Kiara87
sembra che nonostante le difficoltà non demordi, brava questa è la prima dote di un buon programmatore la tenacia o la costanza se preferisci.
Dal mio codice vedo che non sei riuscita ad andare verso i tuoi obiettivi:
1 per ogni estrazione evidenziare le coppie di numeri distanti 30 unità
2 salvare questa elaborazione per usarla altrove....
la tua tenacia mi ha spinto a fornirti il compito risolto.... con tutta una serie di commenti in italiano... ma se vuoi attingere alla vera conoscenza nella programmazione impara un po' di inglese sia perchè le novità le trovi pubblicate in inglese perchè è una lingua universale... sia perchè puoi accedere alle risorse di tutto il mondo della programmazione.
Steve Bplus e _Vince ti hanno dato degli ottimi consigli sotto forma di lezioni che sembrano per principianti, ed in parte lo sono, ma sono sempre valide... sai come quando impari le 4 operazioni alle elementari ma le userai anche quando farai i calcoli di ingegneria o di fisica o di statistica combinatoria (come quella che stai cercando di sviluppare tu qui relativamente al gioco del lotto)
lo stile di programmazione che hai adottato tu con il tuo file Dafinire8.bas è detto spaghetti code perchè l'uso molteplice e continuo del GOTO se fosse evidenziato da un filo che segue il flusso di esecuzione del programma disegnerebbe una matassa di spaghetti ingarbugliati...
può funzionare, ma è molto difficile da correggere e da capire perchè ogni modifica che apporti non sai bene dove e cosa farà. Quindi difficile da costruire in maniera funzionale, difficile da capire quando lo rileggi dopo tempo, difficile da modificare per una espansione o per un adattamento ad un altro compito similare.
Lo stile di programmazione usato dai mitici amici Steve Bplus _Vince e tutti gli altri programmatori di questa community è prevalentemente modulare giacchè Qbasic e QB64 sono linguaggi procedurali o modulari... lo schema che ti ho postato come immagine in questo thread ti indica come progettare un programma per scriverlo in maniera efficiente, rapido, che funzioni, facile da capire, facile da modificare, facile da adattare....
è lo stesso suggerimento di Steve di suddividere l'azione che deve compiere il tuo programma in tante piccole azioni sequenziali e limitare ciascuna di queste in un blocco di codice detto procedura o subroutine o funzione (quando ti da indietro un risultato), e poi se possibile suddividere queste in ulteriori procedure più piccole fino a raggiungere un livello accettabile di semplicità. Fatto questo puoi iniziare a tradurre questo procedimento che si chiama ALGORITMO in CODICE SORGENTE ossia codice che usa parole tipiche di un linguaggio di programmazione e qui tu hai scelto il QB64. Infine con la compilazione il compilatore traduce questo codice ad alto livello in codice binario (una sequenza di 0 e 1 ) che ha significato per la macchina computer e che esegue sempre e solo quello che tu gli hai detto di fare. Mai niente di più. Quindi quando non ottieni il risultato o l'algoritmo è sbagliato o il codice sorgente è sbagliato. In entrambi i casi l' errore è del programmatore. ;-)
e dopo tante chiacchiere ecco il codice sorgente in QB64 del programma cerca coppie di numeri a distanza di 30 unità nella estrazione del lotto leggendo i dati di estrazione da un file di testo in cui ogni riga contiene i dati come una sola cifra. (questa ti sembra una definizione più chiara del programma e di ciò che fa?)
1.
prendi i dati -->
leggi i dati dal file e memorizzali in RAM (mediante variabili)-->
apri il file di dati e leggi i dati e copiali in variabile/variabili dopo aver dichiarato le variabili
2.
analizza i dati estraendo i numeri distanti 30 in ogni estrazione lotto --> la singola sequenza della singola estrazione è formata da 4 cifre iniziali di riga che sono il numero estrazione e da 110 cifre che sono i numeri estratti (ogni numero estratto va da 01 a 90 rappresentati da 2 cifre) le ruote di estrazioni sono 11 e ogni estrazione ha 5 cifre estratte quindi 2*5*11 = 110
Accedendo al file in maniera binaria ossia a basso livello dobbiamo considerare che il segno che di andare a capo corrisponde ad altri 2 carattere CR+LF che corrispondono ai numeri ASCII 13 e 10, quindi accedendo in maniera binaria a basso livello ogni riga termina con questa coppia di numeri ASCII e quindi ogni riga è lunga in modalità testo 4+110 = 114 mentre in modalità binaria 4+110+CR+LF = 116 caratteri
3.
stampa e memorizza i dati estratti --> mostra con colore diverso a video e scrivi su file i dati estratti
ho trovato molto più semplice scrivere tutta la griglia di numeri non analizzati con il colore dei numeri NON distanti 30 e riscrivere poi in secondo tempo i numeri con distanza 30 in altro colore. Mentre la griglia di lettura ossia le ruote e il numero di estrazione hanno un colore diverso per meglio distinguerle. Nella stessa procedura di cerca distanza 30 ho messo la memorizzazione su file degli stessi, mentre il numero estrazione viene segnato nel ciclo (loop) principale.Code: QB64: [Select]e questo è lo screenshot
' Programma lotto di kiara87 ' il programma legge i dati (numeri estratti da un file.dat) ' e permette di vedere le estrazioni a video ' i numeri con distanza 30 sono evidenziati con colore rosso ' questi numeri vengono memorizzati e stampati ' Nota 1: sono d'accordo con Bplus e' molto piu' ' rapido lavorare con dati in RAM che con dati su Disco HDD/SSD/USB/CD/DVD ' valori COSTANTI generali Vero e Falso ' le 11 ruote del lotto ' salta al sottoprogramma LeggiFile delimitato ' dalla Label LeggiFIle e dal RETURN GOSUB LeggiFile ' verifica che tutto il file sia letto 'FOR b = 1 TO LEN(a) - 116 STEP 116 ' PRINT MID$(a, b, 116) ' ' PRINT INSTR(b, a, CHR$(13)) ' _DELAY .1 'NEXT b ' il ciclo DO...LOOP UNTIL condizione e' un modo piu' moderno ' rispetto a Etichetta: .... IF condizione GOTO Etichetta b = 1 z$ = " " CLS ' questo risolve un glitch di output sullo schermo ' in alternativa alla riga sopra CLS nel sottoblocco ' MostraEstratti va stampata la stringa estratto e ' non il suo valore corrispondente ottenuto con VAL GOSUB MostraRuote ' scrive il nome delle ruote del lotto GOSUB MostraEstratti ' prende l'input dell'utente CLOSE #2 END ' indica la fine logica del programma '-----------------------AREA sottoprogrammi /SUBroutines ' questa etichetta /label indica il punto di inizio ' del sottoprogramma (SUBroutine) LeggiFile scritto con vecchio stile GOSUB ' che usa una etichetta/label e un RETURN per riprendere da dove si era interotto ' nota1: un metodo ancora piu' antico e' il salto con GOTO ' che richiede una seconda etichetta per ritornare nel MAIN o programma principale ' nota2: un metodo migliore e' SUB nomeroutine....END SUB ' perche' permette la localizzazione delle variabili LeggiFile: 'se non trova lotto.dat segnala l'errore a video e termina il programma '<-------------------- ' questo metodo e' piu' lento ' apre il file lotto.dat per leggere in maniera sequenziale i dati 'OPEN "lotto.dat" FOR INPUT AS #1 'LINE INPUT #1, a ' riempe la variabile a con una riga intera di valori '<-------------------- ' apre lotto.dat per leggerlo in maniera binaria ' indica il termine della SUBroutine LeggiFile ' e RITORNA alla riga di codice successiva al salto GOSUB 'seconda SUBroutine /sottoprogramma MostraRuote: PRINT "BARI" PRINT "CAGLIARI" PRINT "FIRENZE" PRINT "GENOVA" PRINT "MILANO" PRINT "NAPOLI" PRINT "PALERMO" PRINT "ROMA" PRINT "TORINO" PRINT "VENEZIA" PRINT "NAZIONALE" PRINT "premi q per terminare, + avanti, - indietro" ' indica il termine della SUBroutine MostraRuote ' e RITORNA alla riga di codice successiva al salto GOSUB 'terzo sottoprogramma o SUBroutine MostraEstratti: ' le prime 4 cifre sembrano essere in numero della estrazione y = 13 ' prima posizione per il carattere da stampare A1 = "" ' resetto a1 per il prossimo giro 'posiziona il cursore ' scrive il numero estratto NEXT V GOSUB Mostra30 NEXT x ' indica il termine della SUBroutine MostraEstratti ' e RITORNA alla riga di codice successiva al salto GOSUB Mostra30: 'posiziona il cursore ' scrive il numero estratto 'posiziona il cursore ' scrive il numero estratto NEXT v2 NEXT v1 ' indica il termine della SUBroutine MostraEstratti ' e RITORNA alla riga di codice successiva al salto GOSUB
[ This attachment cannot be displayed inline in 'Print Page' view ]
osservazioni:
-lavorare in RAM è molto più veloce che lavorare su disco
-accedere al file in maniera binaria ti permette di caricare tutto il file in RAM con una unica istruzione
-con MID$ sapendo la struttura della singola estrazione del lotto |numero di 4 cifre|estrazioni di 110cifre 1ruota5estrazioni2ruota5estrazioni...11ruota5estrazioni|acapo CR+LF| puoi navigare attraverso i dati con sicurezza
-una alternativa validissima è l'uso di un array dinamicoCode: QB64: [Select]
-una altra alternativa validissima è l'uso di una UDT con TYPE---END TYPE con un array dinamico
ad esempioCode: QB64: [Select]
TYPE Estrazione ...
Buona avventura nel mondo della programmazione e non cadere nella trappola dei principianti che cambiano continuamente linguaggio perchè pensano di poter farme meglio con una altro rispetto a quello che stanno imparando... ;)
come voi programmatori posizionate i numeri con i locate e li distanziatePRINT si comporta in maniera differente se stampa un numero o una stringa
esempio: mentre io usavo locate 1,10 ecc..
e un altro punto che devo ancora adattarmi esempio io il file lo leggevo con la variabile a e mid$ ma devo capire la funzione di altri variabili aggiunti -->qui si dice al PC di stampare a video il valore della parte della stringa a, estratta con MID$ a partire dalla posizione (V - 1) * 10 + 5 + ((x - 1) * 2) + (b - 1) e di lunghezza Cifra (ricorda che Cifra è una costante di valore 2 ossia al posto di Cifra tu leggi di lunghezza 2 caratteri)
PRINT VAL(MID$(a, (V - 1) * 10 + 5 + ((x - 1) * 2) + (b - 1), Cifra)); " ";
analizza i dati estraendo i numeri distanti 30 in ogni estrazione lotto --> la singola sequenza della singola estrazione è formata da 4 cifre iniziali di riga che sono il numero estrazione e da 110 cifre che sono i numeri estratti (ogni numero estratto va da 01 a 90 rappresentati da 2 cifre) le ruote di estrazioni sono 11 e ogni estrazione ha 5 cifre estratte quindi 2*5*11 = 110Buon studio e buon lavoro sulla comprensione e memorizzazione della sintassi.
Accedendo al file in maniera binaria ossia a basso livello dobbiamo considerare che il segno che di andare a capo corrisponde ad altri 2 carattere CR+LF che corrispondono ai numeri ASCII 13 e 10, quindi accedendo in maniera binaria a basso livello ogni riga termina con questa coppia di numeri ASCII e quindi ogni riga è lunga in modalità testo 4+110 = 114 mentre in modalità binaria 4+110+CR+LF = 116 caratteri
@ kiara87
salve TempodiBasic volevo chiederti riguardo sulla funzione goto i programmatori la evitano a causa del stile spaghetti
quindi evitano anche GOSUB visto che GOSUB è identica come istruzione giusto?
Can you count the QB64 CODE words in reply #84?
@Kiara87says the length of the file as in the image?
Can you count and list the words in this sentence?
Can you write code to count and list the words in any given sentence?
Can you count the words in reply #85 above? Hope you don't get an overflow error ;-))
Can you count the QB64 CODE words in reply #84?
[ This attachment cannot be displayed inline in 'Print Page' view ]
Hmm... looks like we will have to do something about punctuation ;-))
@Kiara87@TempodiBasic si ho visto esempio che il gosub da un ritorno dal codice da dove era partito ritorna 1 volta nella sua postazione
GOTO e GOSUB sono due bacchette magiche che l'apprendista stregone programmatore deve temere e ammirare. Sono potenti ma senza limiti quindi se non sai quello che stai facendo fai di certo un gran pasticcio, come topolino nell'apprendista stregone https://www.youtube.com/watch?v=U546yRNeNh4 (https://www.youtube.com/watch?v=U546yRNeNh4)
giusto per esercizio e per comprensione tu poi considerare GOSUB un GOTO semplificato perchè con RETURN ti permette di ritornare indietro all'istruzione del salto senza usare una ulteriore etichettaCode: QB64: [Select]
is the same thatCode: QB64: [Select]
ma tu puoi costruire i loop WHILE..WEND, DO WHILE..LOOP, DO UNTIL..LOOP; DO..LOOP UNTIL, DO..LOOP WHILE con i rispettivi EXIT WHILE o EXIT DO usando il GOTO e le etichette, lo stesso per FOR NEXT...
prova come esercizio a creare questi loop con GOTO e li comprenderai meglio.
@bplus
PRINT LEN(88)
:-)
@Kiara87
Can you count and list the words in this sentence?
Can you write code to count and list the words in any given sentence?
Can you count the words in reply #85 above? Hope you don't get an overflow error ;-))
Can you count the QB64 CODE words in reply #84?
[ This attachment cannot be displayed inline in 'Print Page' view ]
Hmm... looks like we will have to do something about punctuation ;-))
If it helps, Kiara, remember this -- All computer programming breaks down to 3 steps:
1) Step by step commands
2) Decision making
3) Repetition
Take any problem facing you, and you can break its solution down to those 3 steps (including life problems). Let's say I tell you, "Make me a peanut butter sandwich." How do you accomplish that task?
Get up.
Go in kitchen.
Get a knife.
Get bread.
Get peanut butter.
Open bread, remove a slice.
Put knife in peanut butter.
Remove knife from peanut butter.
Wipe knife on bread.
Put down knife.
Remove slice of bread from pack.
Place bread on bread.
And there's the biggest problem programmers usually face -- we think "fix a sandwich", and we do it. The computer has to have that instruction broken down step-by-step, to accomplish the same task... It's not the complexity of the problem that confound us; it's the simplicity of the computer.
Even with the above set of instructions, it's probably not enough for your pet robot to make that sandwich. "Get up" implies it was down somewhere. "Go in kitchen" is vague. From Where? How many steps? How many turns around corners, or up and down steps? Whose kitchen?
The trick is to break your problem down into smaller stages, and then see if there's a set of computer commands to fulfill those needs. If not, break those needs down smaller, until there are.
For example let's say I tell you to, "Print the contents of a file for me."
Breaking that order down to its components, we have to:
Choose a file.
Open that file.
Load the contents of that file in memory.
Print that file.
Repeat the last two steps until the whole file is printed.
Close the file.
Now, we have a basic step-by-step road map of how our program will look.
INPUT "Give me the name of the file you want to print ", filename$
OPEN filename$ FOR INPUT AS #1
DO
LINE INPUT #1, text$
PRINT text$
LOOP UNTIL EOF(1)
CLOSE #1
Take your complex problem and break it down to its step-by-step components. If you can do that, you can write your own computer programs.
@bplus I tried to copy the sentences from the site and save the sentences in txt
I read the file with this
Code: QB64: [Select]
OPEN "leggi.txt" FOR INPUT AS #1
INPUT #1, a$
PRINT LEN(a$)
CLOSE
gives me length 86
I had attached image in the previous answer
but I was unable to put the sentences inside
I have to try to figure out how to put the draw date again
in both draws which are now two
it is also how to change the values in the second extraction on the right
in the sense if in the left draw there is a distance 30 in the other draw must mark the numbers to play
Assuming date is first 4 digits of each line in data file:
OK so the length of each line of data is 116 counting the CR+LF that would be still embedded in the whole file string so each date would start at 1 + 0 * 116, 1 + 1 * 116, 1 + 2 * 116...
FUNCTION date$(lineNum)
date$ = MID$(a, 1 + (lineNum - 1) * 116, 4) ' a = the SHARED data file string
END FUNCTION
lineNum is same as row number in the data file.
Name Conflict with DATE$ sorry forgot:Code: QB64: [Select]
That date conversion thing is a thinker! I have to consult my calendar functions, this is like work ;(
OK does anybody have a function to convert a lotto number to a day and date?
Hint: Lotto Days are Tues, Thurs, Sat and I assume they don't stop for anything
1465 > = Tues, June 6, 2017
1466 > = Thurs, June 8, 2017
1467 > = Sat, June 10, 2017
...
🤷♂️
OK does anybody have a function to convert a lotto number to a day and date?
Hint: Lotto Days are Tues, Thurs, Sat and I assume they don't stop for anything
1465 > = Tues, June 6, 2017
1466 > = Thurs, June 8, 2017
1467 > = Sat, June 10, 2017
...
🤷♂️
Ha! Yes @SMcNeill thanks to practice checking your time stamps, I think I have handle on this, at least for numbers going forward. I moved start date to Thurs June 1, 2017 to make whole month tests = lotto number 1463 and based calculations starting there.
A little more checking to do but I have good dates through Jan 2, 2018 lotto number 1555.
@Kiara87
Wow, all you folks for whom English is not your first language I am so impressed with your participation here at this forum!
Hopefully I have the Italian correct:Code: QB64: [Select]
DEFLNG A-Z ' given a number (integer) figure the day and date of lotto ' hint: 1465 = Tuesday, June 6, 2017 that is key to this hack job ' moved back to Thursday, June 1, 2017 but might have to move back further ' for lotto number 1. msNomeMesi(1) = "Gennaio" msNomeMesi(2) = "Febbraio" msNomeMesi(3) = "Marzo" msNomeMesi(4) = "Aprile" msNomeMesi(5) = "Maggio" msNomeMesi(6) = "Giugno" msNomeMesi(7) = "Luglio" msNomeMesi(8) = "Agosto" msNomeMesi(9) = "Settembre" msNomeMesi(10) = "Ottobre" msNomeMesi(11) = "Novembre" msNomeMesi(12) = "Dicembre" msSettimana(1) = "Domenica" msSettimana(2) = "Lunedi" msSettimana(3) = "Martedi" msSettimana(4) = "Mercoledi" msSettimana(5) = "Giovedi" msSettimana(6) = "Venerdi" msSettimana(7) = "Sabato" DIM lottoNum 'INPUT "Enter lotto number "; lottoNumX ' lottoNumX = ? yr = 2017 mo = 6 numberOfDays1463 = numberOfDays1463 - daysInMonth%(mo, yr) mo = mo + 1 ' date shound be yr, m0, numberOfDays1465 DIM copyM, copyY copyM = mNum days = 29
now I have to understand how the function fits into the program thanks
The 4 FUNCTIONs go at the end of the code. The array of month names is SHARED at the top of your code with other variables setup. The code in middle is just a demo test to see that the Convert Function works.
When you want to show the date of the Lotto line, LOCATE where you want date and PRINT ConvertLottoNumtoDate$(lottoNum) which is the first 4 digits of the line from Lotto.dat.
dim lottoDate$Code: QB64: [Select]
lineNum = 1 a = fileDAT(lineNum) lineNum2 = 1 a2 = fileDAT(lineNum2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' lottoNum = 1465
When we set our line numbers from the Click or Keypress, we can also get the date for each extraction:Code: QB64: [Select]
lottoDate$ = ConvertLottoNumToDate$(lottNum) ' fix spelling of the function it's convert with an n lottoDate2$ = ConvertLottoNumToDate$(lottNum2) ' fix spelling of the function it's convert with an n
Now this section can be labeled better with dates:Code: QB64: [Select]
Probably don't need the weekday names they are built into functions and the labels can be moved to top with the other data setup.
Spiffy enough for now:Code: QB64: [Select]
_TITLE "Lotto Data" 'for typo's yep lineMun blah! b+ mod of kiara mod of b+ 2020-07-15 '2020-07-17 remove weekday names, move labels into there, fix bottom line up/down click ' fix function convertLottoNum2Date$ spelling ' clean out some redundant code loops DIM count ' for number of lines in the data file ' user inputs DIM Q$ ' for INKEY$ DIM mb, mx, my, oldmouse ' Mouse stuff oldmouse is trick Steve McNeill showed us to get ONE mouse click! ' these would normally go in SUBs or FUNCTIONs but we are using GOSUBs here shiftRight = 11 ' according to screen fit shiftRight2 = 65 ' according to screen fit DIM i ' common use for indexing msNomeMesi(1) = "Gennaio" msNomeMesi(2) = "Febbraio" msNomeMesi(3) = "Marzo" msNomeMesi(4) = "Aprile" msNomeMesi(5) = "Maggio" msNomeMesi(6) = "Giugno" msNomeMesi(7) = "Luglio" msNomeMesi(8) = "Agosto" msNomeMesi(9) = "Settembre" msNomeMesi(10) = "Ottobre" msNomeMesi(11) = "Novembre" msNomeMesi(12) = "Dicembre" labels(1) = "BARI" labels(2) = "CAGLIARI" labels(3) = "FIRENZE" labels(4) = "GENOVA" labels(5) = "MILANO" labels(6) = "NAPOLI" labels(7) = "PALERMO" labels(8) = "ROMA" labels(9) = "TORINO" labels(10) = "VENEZIA" labels(11) = "NAZIONALE" '-------------------------------- start Main setup get file data loaded into array 'count lines in file ' debug check inputs from file 'PRINT a 'INPUT " OK enter "; w$ CLOSE #1 'now we now size of file so ready an array to load file Data CLOSE #1 'get/set first line and get a data string from the FileDAT array (left set on screen) lineNum = 1 a = fileDAT(lineNum) lottoDate$ = ConvertLottoNumToDate$(lottoNum) 'get/set right side start variables lineNum2 = 1 a2 = fileDAT(lineNum2) lottoDate2$ = ConvertLottoNumToDate$(lottoNum2) DO '------------------------------------------------ Main Loop User selects data to compare Q$ = INKEY$ 'LOCATE 3, 1: PRINT mx, my '_DELAY .25 ' just one click please! 'get new data line a = fileDAT(lineNum) 'left side data lottoDate$ = ConvertLottoNumToDate$(lottoNum) a2 = fileDAT(lineNum2) 'right side data lottoDate2$ = ConvertLottoNumToDate$(lottoNum2) 'print out the data from the new line GOSUB labelScreen GOSUB screenDataLine GOSUB loadLineDAT_Mark30s _LIMIT 30 loadLineDAT_Mark30s: 'this loads the lineDAT array, so we can sweep through the columes and mark 30's rowCnt = 1: y = 1 rowCnt = rowCnt + 1 ' increase column if at 6 start new row ''----------------------------- plug in new color routine here for right side ??? 'rowCnt = 1: y = 1 'FOR i = 5 TO LEN(a2) STEP 2 ' is marking off the start of each data 2 digit integer ' lineDAT(rowCnt, y) = VAL(MID$(a2, i, 2)) 'convert data item to integer ' rowCnt = rowCnt + 1 ' increase column if at 6 start new row ' IF rowCnt = 6 THEN y = y + 1: rowCnt = 1 'NEXT 'COLOR 9 'blue marker seacrh through columes for 30's 'FOR col = 1 TO 5 'for each of the columes of data ' FOR row = 1 TO 10 'for each of the rows of dat ' FOR rowPlus = row + 1 TO 11 'compare the next rows for diff 30 with current col, row ' 'IF diff30in90(lineDAT(col, row), lineDAT(col, rowPlus)) THEN ' ' LOCATE row * 2 + 1, col * 3 - 2 + shiftRight2: PRINT DD$(lineDAT(col, row)); ' ' LOCATE rowPlus * 2 + 1, col * 3 - 2 + shiftRight2: PRINT DD$(lineDAT(col, rowPlus)); ' 'END IF ' NEXT ' NEXT 'NEXT screenDataLine: COLOR 15 PRINT lottoNum; lottoDate$; PRINT lottoNum2; lottoDate2$; aPlace = 5 aPlace = aPlace + 2 labelScreen: COLOR 15 PRINT " Fino / Up Giu / Down : Fare clic su : Fino / Up Giu / Down"; ' 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ' 1 2 3 4 5 6 7 8 DIM hi, lo diff30in90 = -1 ' ----------------------------------------------------- Convert Lotto Num to Date Function and helpers yr = 2017 mo = 6 numberOfDays1463 = numberOfDays1463 - daysInMonth%(mo, yr) mo = mo + 1 ' date shound be day name date/month/year for Italians DIM copyM, copyY copyM = mNum days = 29
you can see that it works dates go back and forth
Looking for 67 and 4 in a line on the right side for this pair of 30's on left side?
[ This attachment cannot be displayed inline in 'Print Page' view ]
Correct?
Here it is (I think).Code: QB64: [Select]
_TITLE "Lotto Data" '2020-07-17 remove weekday names, move labels into there, fix bottom line up/down click ' fix function convertLottoNum2Date$ spelling ' clean out some redundant code loops ' 2020-07-18 change GOSUB loadLineDAT_Mark30s: ' to mark Blue only line with triple pairs. Can only do one pair at time for right screen check. ' Make function missingTriple, so we know what number to search for on right screen. ' OK modified loadLineDAT_Mark30s: GOSUB some more to catch the missing triple pair ' marked in Red on right screen. DIM count ' for number of lines in the data file ' user inputs DIM Q$ ' for INKEY$ DIM mb, mx, my, oldmouse ' Mouse stuff oldmouse is trick Steve McNeill showed us to get ONE mouse click! ' these would normally go in SUBs or FUNCTIONs but we are using GOSUBs here shiftRight = 11 ' according to screen fit shiftRight2 = 65 ' according to screen fit DIM i ' common use for indexing msNomeMesi(1) = "Gennaio" msNomeMesi(2) = "Febbraio" msNomeMesi(3) = "Marzo" msNomeMesi(4) = "Aprile" msNomeMesi(5) = "Maggio" msNomeMesi(6) = "Giugno" msNomeMesi(7) = "Luglio" msNomeMesi(8) = "Agosto" msNomeMesi(9) = "Settembre" msNomeMesi(10) = "Ottobre" msNomeMesi(11) = "Novembre" msNomeMesi(12) = "Dicembre" labels(1) = "BARI" labels(2) = "CAGLIARI" labels(3) = "FIRENZE" labels(4) = "GENOVA" labels(5) = "MILANO" labels(6) = "NAPOLI" labels(7) = "PALERMO" labels(8) = "ROMA" labels(9) = "TORINO" labels(10) = "VENEZIA" labels(11) = "NAZIONALE" '-------------------------------- start Main setup get file data loaded into array 'count lines in file ' debug check inputs from file 'PRINT a 'INPUT " OK enter "; w$ CLOSE #1 'now we now size of file so ready an array to load file Data CLOSE #1 'get/set first line and get a data string from the FileDAT array (left set on screen) lineNum = 1 a = fileDAT(lineNum) lottoDate$ = ConvertLottoNumToDate$(lottoNum) 'get/set right side start variables lineNum2 = 1 a2 = fileDAT(lineNum2) lottoDate2$ = ConvertLottoNumToDate$(lottoNum2) DO '------------------------------------------------ Main Loop User selects data to compare Q$ = INKEY$ 'LOCATE 3, 1: PRINT mx, my '_DELAY .25 ' just one click please! 'get new data line a = fileDAT(lineNum) 'left side data lottoDate$ = ConvertLottoNumToDate$(lottoNum) a2 = fileDAT(lineNum2) 'right side data lottoDate2$ = ConvertLottoNumToDate$(lottoNum2) 'print out the data from the new line GOSUB labelScreen GOSUB screenDataLine GOSUB loadLineDAT_Mark30s _LIMIT 30 loadLineDAT_Mark30s: 'this loads the lineDAT array, so we can sweep through the columes and mark 30's rowCnt = 1: y = 1 rowCnt = rowCnt + 1 ' increase column if at 6 start new row nHits = 0: third1 = 0: third2 = 0 hits(col, 0) = lineDAT(col, row): hits(col, 1) = lineDAT(col, rowPlus): nHits = nHits + 1 third2 = missingTriple(hits(col, 0), hits(col, 1)) third1 = missingTriple(hits(col, 0), hits(col, 1)) 'OK now search the right screen for a line containing the 3rd triple pair rowCnt = 1: y = 1 rowCnt = rowCnt + 1 ' increase column if at 6 start new row hit1st = 0: hit2nd = 0 RETURN ' sorry we can do only one triple pair screenDataLine: COLOR 15 PRINT lottoNum; lottoDate$; PRINT lottoNum2; lottoDate2$; aPlace = 5 aPlace = aPlace + 2 labelScreen: COLOR 15 PRINT " Fino / Up Giu / Down : Fare clic su : Fino / Up Giu / Down"; ' 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ' 1 2 3 4 5 6 7 8 DIM hi, lo diff30in90 = -1 first = t1 second = t1 third = t1 first = t2 second = t2 third = t2 missingTriple = second - 30 missingTriple = third - 30 missingTriple = second + 30 ' ----------------------------------------------------- Convert Lotto Num to Date Function and helpers yr = 2017 mo = 6 numberOfDays1463 = numberOfDays1463 - daysInMonth%(mo, yr) mo = mo + 1 ' date shound be day name date/month/year for Italians DIM copyM, copyY copyM = mNum days = 29
EDIT: Decided to mark the label Red too. So far 1465 has triples finished in 1590, 1676, 1701...
Oops, time to get to bed that was 1823 not 1873. 1928 is last one for 1465.
Well good luck with all those numbers!
It's very confusing locating all the different triple completions you describe, I recommend color coding each triple completion. For multiple pairs, displayed in middle, you will have to track location rows for printing labels and the different missing triple with it's own associated color when there is more than one pair.
I think I did the hardest one finding a pair of triple completions in on a row! It might have been way easier had I known any triple completion gets marked. Oh well fun challenge don't see the sense of all this and seems like work/nonsensical to get everything on screen at once.
I think you lost me when saying the columns don't even have to match up. Pretty much changes the algorithm needed to search for triples.
Hi guys
how do you find this undefinied project about lotto?
I haven't follow more the thread and so now after a speed read
1. I have not understood how you have pulled out the date from the number of extraction ....
2. it seems that the goal of program lotto has been changed because from images posted by Kiara87 it seems that now it is not more important to find the number with distance of 30 but some triples....
Please Kiara87 show us the whole plan of program... it is too hard spending time to accomplish a task that is partial and unuseful...be clear and complete!
Italian Google version....
Ciao ragazzi
come trovi questo progetto indefinito sul lotto?
Non ho seguito più il thread e quindi ora dopo una lettura veloce
1. Non ho capito come hai estratto la data dal numero di estrazione ....
2. sembra che l'obiettivo del programma lotto sia stato modificato perché dalle immagini pubblicate da Kiara87 sembra che ora non sia più importante trovare il numero con una distanza di 30 ma alcune triple ...
Per favore, Kiara87 ci mostra l'intero piano del programma ... è troppo difficile passare del tempo per compiere un compito che è parziale e inutile ... sii chiaro e completo!
@Kiara87
per la funzione della data andrò a guardare il codice di Bplus così da capire quale algoritmo di codifica è stato usato visto che il numero di estrazione è vario di anno in anno e non supera il valore 150 come si può evincere guardando un po' gli archivi qui
https://www.estrazionedellotto.it/risultati/archivio-lotto-2017 (https://www.estrazionedellotto.it/risultati/archivio-lotto-2017)
riguardo al tuo scopo finale sembra che sia trovare il numero assente della tripletta con distanza 30 in orizzontale e in verticale.... aspettando maggiori informazioni riguardo la direzione diagonale da usare.
usa l'immagine che posto qui per spiegarmi la diagonale di cui parli.
for function of data I'll take a look at Bplus' code so to understand what algorythm to codify it has been used seeing that the number of extraction is different each year and it cannot be more tha 150 as value as you can understand looking just a little into archives here
https://www.estrazionedellotto.it/risultati/archivio-lotto-2017 (https://www.estrazionedellotto.it/risultati/archivio-lotto-2017)
about your goal it seems to get the absent number of a triplet with distance of 30 both in vertical both horizontal....
waiting more informations about diagonal direction to use.
Use the image that I post here to explain me the diagonal direction of which you talk.
[ This attachment cannot be displayed inline in 'Print Page' view ]
Ambi ISOTOPI.... questa Aritmologia e Cabala da lotto mi manda in corto circuito i neuroni :-)si ho visto il tuo link ma io volevo farlo con QB64 PER imparare come fare un programma del lotto e anche imparare il QB64
cmq sembra che qui ci sia un programma che ti potrebbe aiutare già fatto da qualcun altro....http://www.pc-facile.com/forum/viewtopic.php?t=110012 (http://www.pc-facile.com/forum/viewtopic.php?t=110012) guarda in fondo al thread c'è il link per il programma.
Solo a vedere questi ragionamenti cabalistici mi viene l'orticaria :-) https://www.lottogazzetta.it/metodo-dellambo-ripetuto-isotopo-i-parte/ (https://www.lottogazzetta.it/metodo-dellambo-ripetuto-isotopo-i-parte/) forse è per questo che mi riesce difficile capire quello che ti serve una mia naturale allergia al campo del lotto.
@Kiara87
Here it is, I couldn't leave it alone. I knew there wasn't enough room to print all the pairs of Triples in the middle screen with labels so I did an short version.
Complete make over almost!Code: QB64: [Select]
'2020-07-17 remove weekday names, move labels into there, fix bottom line up/down click ' fix function convertLottoNum2Date$ spelling ' clean out some redundant code loops ' 2020-07-18 change GOSUB loadLineDAT_Mark30s: ' to mark Blue only line with triple pairs. Can only do one pair at time for right screen check. ' Make function missingTriple, so we know what number to search for on right screen. ' OK modified loadLineDAT_Mark30s: GOSUB some more to catch the missing triple pair ' marked in Red on right screen. ' ' * * * A whole different approach! * * * ' 2020-07-23 OK look for triple pairs in left screen to complete in the right screen. ' ALL NUMBERS ARE COLOR CODED IN LEFT SCREEN ' The most triples possible is 30, in fact lets keep an array to track which triple ' each data item on left screen is a member of. The we will analyze the 30 triples for ' Singles, Pairs and Complete Triples. ' We will feed a sub 2 data strings from the file and it will match up the missing triples in right screen. ' create showLottoLines - takes 2 lotto lines and creates array with all triples sorted into locations, ' and display screens while we data in hand. ' create whichTriple - takes a lotto number in string form and assigns a base30 number and level 1 to 3 ' create makePal - makes a palette of 30 distinct colors I hope ' convert labelscreen to sub. ' Looks marvelous to me! shiftRight = 11 ' according to screen fit shiftRight2 = 65 ' according to screen fit DIM count ' for number of lines in the data file ' user inputs DIM Q$ ' for INKEY$ DIM mb, mx, my, oldmouse ' Mouse stuff oldmouse is trick Steve McNeill showed us to get ONE mouse click! DIM i ' common use for indexing msNomeMesi(1) = "Gennaio" msNomeMesi(2) = "Febbraio" msNomeMesi(3) = "Marzo" msNomeMesi(4) = "Aprile" msNomeMesi(5) = "Maggio" msNomeMesi(6) = "Giugno" msNomeMesi(7) = "Luglio" msNomeMesi(8) = "Agosto" msNomeMesi(9) = "Settembre" msNomeMesi(10) = "Ottobre" msNomeMesi(11) = "Novembre" msNomeMesi(12) = "Dicembre" labels(1) = "BARI" labels(2) = "CAGLIARI" labels(3) = "FIRENZE" labels(4) = "GENOVA" labels(5) = "MILANO" labels(6) = "NAPOLI" labels(7) = "PALERMO" labels(8) = "ROMA" labels(9) = "TORINO" labels(10) = "VENEZIA" labels(11) = "NAZIONALE" '-------------------------------- start Main setup get file data loaded into array makePal 'load up palette 'count lines in file ' debug check inputs from file 'PRINT a 'INPUT " OK enter "; w$ CLOSE #1 'now we know size of file so ready an array to load file Data CLOSE #1 'get/set first line and get a data string from the FileDAT array (left set on screen) lineNum = 1 'left screen data line lineNum2 = 1 'right screen data line DO '------------------------------------------------ Main Loop User selects data to compare Q$ = INKEY$ labelScreen showLottoLines fileDAT(lineNum), fileDAT(lineNum2) 'print out the data from the new line _LIMIT 30 SUB labelScreen DIM i COLOR &HFFFFFFFF PRINT " Fino / Up Giu / Down : Fare clic su : Fino / Up Giu / Down"; ' 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ' 1 2 3 4 5 6 7 8 SUB makePal 'make 30 distinctive colors I hope q = 40 lottoDate$ = ConvertLottoNumToDate$(lottoNum) lottoDate$ = ConvertLottoNumToDate$(lottoNum) whichTriple d$, b, l sortedData(b, l) = sortedData(b, l) + DD$(i) 'creating a string of Double Digit (DD$) data locations printline = 3 ' to 24 COLOR &HFFFFFFFF count = 0 s$ = "" d$ = sortedData(i, j) d$ = "XX" missingT = i + (j - 1) * (30) 'scan the right data for missingT aplace = 5 aplace = aplace + 2 printline = printline + 1 SUB whichTriple (number1To90$, base30, level30) 'return a number 1 to 30 and a level 1 to 3 for 2 digit loot number base30 = n: level30 = 1 base30 = n - 30: level30 = 2 base30 = n - 60: level30 = 3 ' ----------------------------------------------------- Convert Lotto Num to Date Function and helpers yr = 2017 mo = 6 numberOfDays1463 = numberOfDays1463 - daysInMonth%(mo, yr) mo = mo + 1 ' date shound be day name date/month/year for Italians DIM copyM, copyY copyM = mNum days = 29
[ This attachment cannot be displayed inline in 'Print Page' view ]
You can see the completed triple stand out 19, 49, 79 on the first screen.
thanks bplus
but this not only finds the distance 30 but finds all numbers
but a great job you are very good at programming
this will be useful when I learn
so I can edit it
Listed in the middle are all the triple PAIRS missing the 3rd triple in the Left screen, the found 3rd triple is color coded on the right.
Isn't that what you wanted? (except the color coding, but that makes more clear which triple it is from.)
Oh also I listed the data location 1 to 55 instead of the Italian Label names for the rows (1 to 11) so you can locate exactly where the triple came from. Like I said there is NOT enough room to list all the Italian label names for the pairs. Could convert to row numbers with a conversion function.
for example in the extraction of 6 June 2017
from only two conditions
that are these
06/06/2017 CAGLIARI 37-34 (1°-2°) Dist.Vert.30
06/06/2017 MILANO 07-64 (1°-2°)
Ambi ISOTOPI
-------------------------------------------
06/06/2017 NAPOLI 72-84 (2°-4°) Dist.Diag.30
06/06/2017 VENEZIA 24-12 (2°-4°)
Ambi ISOTOPI
@Kiara87aritmologiche ma nel lotto si chiamano terzine simmetriche
riguardo a
rilevati i 2 ambi isotopi con distanza 30 seguendo le regole aritmologiche 24-84= -60 +90 =30 distanza 30 diagonale, 12 - 72 = -60 +90 = 30 cosa altro deve fare il programma del lotto?
Hi kiara87
please give a look at this program, it may be a good start to get your goal....you must add the date code like that made by Bplus and you have completed the program about AMBO ISOTOPI
https://www.qb64.org/forum/index.php?topic=2891.msg121537#msg121537 (https://www.qb64.org/forum/index.php?topic=2891.msg121537#msg121537)
------------------------
Ciao kiara87
potresti dare uno sguardo a questo programma, esso potrebbe essere un buon inizio per il tuo obiettivo.... tu devi aggiungere il codice per ottenere la data di estrazione come quello fatto da Bplus e così dovresti aver completato il programma su AMBO ISOTOPI. https://www.qb64.org/forum/index.php?topic=2891.msg121537#msg121537 (https://www.qb64.org/forum/index.php?topic=2891.msg121537#msg121537)
devo finire questo progetto aggiungendo la data e cercando i numeri nella estrazione di destra
e dove trova la condizione stampa anche le rote
questo e un programma complesso però credo anche si cresce nella programmazione una volta riuscito a creare qualcosa del genere
bhe credo che cè sempre da imparare cose nuove
devo finire questo progetto aggiungendo la data e cercando i numeri nella estrazione di destraqueste altre funzionalità rientrano nella gamma delle tue capacità di codifica! Ma ricorda prima il piano di progettazione delle azioni, quindi traduci quest'ultimo in QB64!
e dove trova la condizione stampa anche le rote
questo e un programma complesso però credo anche si cresce nella programmazione una volta riuscito a creare qualcosa del genere
beh credo che cè sempre da imparare cose nuove
Hi kiara87
--------------------
bene vedo che il codice incompleto pubblicato fa quello che stai cercando di ottenere ... ma per me è stato molto difficile capire alcuni concetti che stanno dietro la tua richiesta e non sono visibili finché, di volta in volta, non sono usciti dalla tua parole...
riguardo a queste altre funzionalità rientrano nella gamma delle tue capacità di codifica! Ma ricorda prima il piano di progettazione delle azioni, quindi traduci quest'ultimo in QB64!
E sono d'accordo che solo scrivendo programmi puoi crescere ...
Buona continuazione della programmazione
devo finire questo progetto aggiungendo la data e cercando i numeri nella estrazione di destra-add the date in the middle of two extractions
e dove trova la condizione stampa anche le rote
questo e un programma complesso però credo anche si cresce nella programmazione una volta riuscito a creare qualcosa del genere
beh credo che cè sempre da imparare cose nuove
Hi Kiara87
1. for the first step follow this link
https://translate.google.it/?hl=it#view=home&op=translate&sl=it&tl=en&text=aiutami (https://translate.google.it/?hl=it#view=home&op=translate&sl=it&tl=en&text=aiutami) and so you can gain the right way to say aiutami
2.
your project is -add the date in the middle of two extractions
- search the suggested number into the extraction on the right
- print on the screen the wheels of that numbers
as soon as I have some time I'll post something for you.