[Kotlin]Ritornare ad un punto precedente?

Nicco199o

Utente Attivo
904
86
CPU
intel core i7 6500U skylake
Dissipatore
integrato
Scheda Madre
del notebook asus x
HDD
250gb ssd
RAM
8gb
GPU
nVidia geforce 920m
Audio
realtek high definition audio
Monitor
samsung SyncMaster p2770HD
PSU
450w asus
Case
E un notebook elegante e robusto
Periferiche
Mouse e tastiera logitech cuffie sony
Net
100mb
OS
Windows 10 pro
Come da screenshot allegato, vorrei fare che dal commento "da qui" il codice ritorni a "ritorna qui", ho provato con return, ma non funzionava. Qualche Aiuto grazie?
492c33b83e95ae3a24459a291e004c88.jpg


Sent from my SM-N950F using Tapatalk
 

rodhellas

Utente Èlite
1,522
427
CPU
Ryzen 5 3600
Dissipatore
GELID Phantom
Scheda Madre
MSI B450 Gaming Plus Max
HDD
500GB m.2 + 2TB HDD
RAM
16GB Corsair LPX 3000mhz
GPU
Gigabyte GTX 960 OC
Audio
Integrata
Monitor
SyncMaster 223BW
PSU
Antec HCG-520M
Case
Meshify C
Net
Gigabit Fastweb
OS
Windows 10 64bit
Usare un ciclo?
 

pabloski

Utente Èlite
2,868
916
return? why? return esce dallo scope corrente, quindi dalla funzione in cui ti trovi

lì giustamente basta un ciclo
 

Nicco199o

Utente Attivo
904
86
CPU
intel core i7 6500U skylake
Dissipatore
integrato
Scheda Madre
del notebook asus x
HDD
250gb ssd
RAM
8gb
GPU
nVidia geforce 920m
Audio
realtek high definition audio
Monitor
samsung SyncMaster p2770HD
PSU
450w asus
Case
E un notebook elegante e robusto
Periferiche
Mouse e tastiera logitech cuffie sony
Net
100mb
OS
Windows 10 pro
return? why? return esce dallo scope corrente, quindi dalla funzione in cui ti trovi

lì giustamente basta un ciclo
Grazie, ho iniziato ieri con Kotlin, proverò con un ciclo

Sent from my SM-N950F using Tapatalk
 

Nicco199o

Utente Attivo
904
86
CPU
intel core i7 6500U skylake
Dissipatore
integrato
Scheda Madre
del notebook asus x
HDD
250gb ssd
RAM
8gb
GPU
nVidia geforce 920m
Audio
realtek high definition audio
Monitor
samsung SyncMaster p2770HD
PSU
450w asus
Case
E un notebook elegante e robusto
Periferiche
Mouse e tastiera logitech cuffie sony
Net
100mb
OS
Windows 10 pro
Le istruzioni usale quando sai quello che fanno.
Mi avevano detto che return su Kotlin return funzionava da ogni punto del codice

Sent from my SM-N950F using Tapatalk
 

rodhellas

Utente Èlite
1,522
427
CPU
Ryzen 5 3600
Dissipatore
GELID Phantom
Scheda Madre
MSI B450 Gaming Plus Max
HDD
500GB m.2 + 2TB HDD
RAM
16GB Corsair LPX 3000mhz
GPU
Gigabyte GTX 960 OC
Audio
Integrata
Monitor
SyncMaster 223BW
PSU
Antec HCG-520M
Case
Meshify C
Net
Gigabit Fastweb
OS
Windows 10 64bit
Mi avevano detto che return su Kotlin return funzionava da ogni punto del codice

Sent from my SM-N950F using Tapatalk
Che si possano usare ovunque nel codice vale anche per altri linguaggi, ma lo scopo del return è ben preciso.
 

Giacomo Furlan

Utente Attivo
351
87
CPU
AMD Ryzen 5900x
Dissipatore
BeQuiet! SilentLoop 2 360mm
Scheda Madre
Gigabyte X470 AORUS Gaming 7 WIFI AMD X470
HDD
Crucial P5 Plus 2 TB PCIe M.2 2280SS
RAM
Patriot Viper Steel RAM DDR4 3600 Mhz 64GB (2x32GB) C18
GPU
MSI GeForce RTX 2080 Gaming X Trio
Audio
SteelSeries Arctis 9
Monitor
Alienware AW3423DWF
PSU
EVGA SuperNOVA 650 G3, 80 Plus GOLD 650W
Case
Sharkoon TG5
OS
Windows 11, Fedora 36
Grazie, ho iniziato ieri con Kotlin, proverò con un ciclo

Sent from my SM-N950F using Tapatalk
Perdonami, ma credo che tu abbia cominciato con la programmazione l'altro giorno, non Kotlin :)
 
  • Mi piace
Reazioni: Mursey

Entra

oppure Accedi utilizzando
Discord Ufficiale Entra ora!

Discussioni Simili