Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Fondamenti di architettura e programmazione > [Indentazione] Problema!!!
Pages (5): « 1 2 [3] 4 5 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Allora...

si possono usare o l'hashtable o una variabile statica.

a uno dei due fai contenere un int che è il numero di spazi che deve dare davanti ad ogni istruzione.

una nuova string, ad esempio SPAZIO=SPAZIO+" "; da mettere in ogni toString tranne in quello di Sequenza, e dovrà essere riempita tramite un ciclo for(int i=0; i<INTdicuiparlavamoprima; i++)

esce una cosa bella complicata...

a seconda delle necessità si fa Nspazi+1 o -1 oppure si lascia pulito e si rimette con un put ( in caso dell'hashtable ) oppure con un'assegnazione ( variabile statica ).

ciauz :D

10-02-2006 17:42
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

SI, MA IL PROBLEMA PERSISTE!!!
DEVI SAPERE DOVE METTERE GLI SPAZI!!! E QUINDI DEVI SAPERE IL PROGRAMMA COME VIENE SVOLTO!!!!

SONO DACCORDO CON TE CHE VA BENE CON QUESTO PROGRAMMA, MA SE LO ESTENDIAMO AD UN ALTRO MAIN CON MOLTE PIU' ISTRUZIONI NON VA PIU' BENE!!!

E' QUESTO IL VERO PROBLEMA!!!
PERCHE' ALTRIMENTI BASTAVA METTERE SPAZI OGNI QUAL VOLTA SAPEVI CHE ANDAVANO MESSI!!!!

__________________
- - {[( KEVIN HIGHT FLY)]} - -

10-02-2006 18:06
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
sbrandu
.consigliere.

User info:
Registered: May 2004
Posts: 148 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 3 Days, 21:31:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grande!
Sarà un lavoraccio ma grazie!

10-02-2006 18:06
Click Here to See the Profile for sbrandu Click here to Send sbrandu a Private Message Find more posts by sbrandu Add sbrandu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Skioda86
SI, MA IL PROBLEMA PERSISTE!!!
DEVI SAPERE DOVE METTERE GLI SPAZI!!! E QUINDI DEVI SAPERE IL PROGRAMMA COME VIENE SVOLTO!!!!

SONO DACCORDO CON TE CHE VA BENE CON QUESTO PROGRAMMA, MA SE LO ESTENDIAMO AD UN ALTRO MAIN CON MOLTE PIU' ISTRUZIONI NON VA PIU' BENE!!!

E' QUESTO IL VERO PROBLEMA!!!
PERCHE' ALTRIMENTI BASTAVA METTERE SPAZI OGNI QUAL VOLTA SAPEVI CHE ANDAVANO MESSI!!!!


...

veramente no... se mi passi un altro main con queste istruzioni te lo dimostro ^_^

10-02-2006 18:07
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Se io al posto di dichiarare 2 variabili in un ciclo while ne dichiaro 5 come fa il tuo programma a sapere quando deve smettere di metterne o meglio...quanti metterne se tu non sai a priori quante istruzioni ci sono dentro ad un while!!!??!!

__________________
- - {[( KEVIN HIGHT FLY)]} - -

10-02-2006 18:10
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

basta mettere un nspazi+2 ad inizio while ed un nspazi-2 a fine while :D semplice

10-02-2006 18:15
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma appunto!!! Devi cambiare il codice del programma per farlo andare!!!! Invece 1 kosa fatta per bene è che fai tutte le tue classi e identano da sole senza piu' bisogno di toccare niente!!

__________________
- - {[( KEVIN HIGHT FLY)]} - -

10-02-2006 18:23
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

................ mi sa che non hai capito

il cambio di nspazi lo fai nella classe iterazione e selezione. e glielo fai fare a lui in base alla posizione identata in precedenza.

10-02-2006 18:27
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Skioda86
.precettore.

User info:
Registered: Jun 2005
Posts: 90 (0.01 al dì)
Location: Borno (BS)
Corso: Comunicazione Digitale
Anno: 1
Time Online: 21:00:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok!


facciamo che io dico mentre (....) se(....) 3 istruzioni altrimenti se(...)
alreimenti(...)altre 5 istruzioni

code:
while() e spostati di 2 if() e spostati di 2 ciao ----> ciao ----> come fai a fargli capire che sono 3 che deve identare ciao ----> else <---- while ----> bla ----> bla ----> bla ----> bla ----> bla ----> <---


voresti dirmi che senza toccare il progetto posso anche passargli un main in cui dico
mente (....) fammi solo questo e poi fammi 1altra cosa

code:
while() ciao ----> ciao <----

:)

__________________
- - {[( KEVIN HIGHT FLY)]} - -

Last edited by Skioda86 on 10-02-2006 at 18:38

10-02-2006 18:34
Click Here to See the Profile for Skioda86 Click here to Send Skioda86 a Private Message Visit Skioda86's homepage! Find more posts by Skioda86 Add Skioda86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
spenk.85
.illuminato.

User info:
Registered: Nov 2005
Posts: 196 (0.03 al dì)
Location: Muggiò
Corso: Comunicazione Digitale
Anno: x
Time Online: 1 Day, 12:55:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

drowne sei troppo un grande! anche io pome avevo pensato a una cosa simile con il mio amico, ora sappiamo che funza e lo faremo andare!grande!

Ma quando li togli gli spazi?

Last edited by spenk.85 on 10-02-2006 at 18:53

10-02-2006 18:37
Click Here to See the Profile for spenk.85 Click here to Send spenk.85 a Private Message Find more posts by spenk.85 Add spenk.85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

quando chiudi un while, quando c'è l'IF o l'ELSE

10-02-2006 19:05
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

@ SKIODA:







cosi, no?

10-02-2006 19:08
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.09 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusa ma se hai una sequenza di istruzioni (tipo nella istrSe) come fai a leggere una istruzione alla volta?

10-02-2006 19:09
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Drowne
Java Tentonaro

User info:
Registered: Jan 2005
Posts: 230 (0.03 al dì)
Location: Milano
Corso: Comunicazione digitale
Anno: primo
Time Online: 2 Days, 0:03:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

la sequenza non è da identare infatti.

se fai spazio+sequenza identa solo il primo.

ma una sequenza è composta da un tot numero di istruzioni? Basta identare le istruzioni correttamente ed anche la sequenza sarà identata :D

10-02-2006 19:27
Click Here to See the Profile for Drowne Click here to Send Drowne a Private Message Visit Drowne's homepage! Find more posts by Drowne Add Drowne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.09 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok ma come fai a indentare le istruzioni della sequenza?

10-02-2006 19:30
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 01:10.    Post New Thread    Post A Reply
Pages (5): « 1 2 [3] 4 5 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.059 seconds (70.29% PHP - 29.71% MySQL) con 23 query.