Click here to Skip to main content
16,006,065 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: IF ELSE or LOOP Pin
vijay24821-May-09 1:06
vijay24821-May-09 1:06 
GeneralRe: IF ELSE or LOOP Pin
riced1-May-09 1:23
riced1-May-09 1:23 
GeneralRe: IF ELSE or LOOP Pin
vijay24821-May-09 7:27
vijay24821-May-09 7:27 
GeneralRe: IF ELSE or LOOP Pin
riced2-May-09 3:32
riced2-May-09 3:32 
GeneralRe: IF ELSE or LOOP Pin
riced2-May-09 11:50
riced2-May-09 11:50 
GeneralRe: IF ELSE or LOOP Pin
vijay24822-May-09 21:57
vijay24822-May-09 21:57 
GeneralMessage Closed Pin
3-May-09 21:17
vijay24823-May-09 21:17 
GeneralRe: IF ELSE or LOOP [modified] Pin
riced3-May-09 23:02
riced3-May-09 23:02 
That's not unexpected. Smile | :)
The hack was to deal with the big file you sent in a previous post (and as I said I'm not certain it would actually work 100%, even for that file).
If you check the two input files I suspect you'll find that the one that worked has consistent spacing for each generation; the one that failed did not. Or the one that worked had spacing that the hack could deal with.
The problem is that for each file that fails you have to examine the file and find out how the spacing changes, then devise a hack that deals with it (and that may not be possible). That's why consistent spacing is so important.
The hack relies on the file being in two blocks as shown in this edited extract (^ represents space in Generation column).
 Name etc                                            Generation
 01260709.ASM                    unité moteur        ^Parent
     4296458M91.ASM              ENS MOTEUR 74       ^^^^^Child           'Start of first block
     4296454M1.ASM               MOTEUR 74           ^^^^^Child
       BLOC_MOTEUR_SRT2.ASM      --                  ^^^^^^^Grand Child
         832760664_SANS_SRT2.ASM --                  ^^^^^^^^^Great Grand Child
--- removed lots of lines in file -------            
     4282023M91.ASM              ENS. VOLANT MOTEUR  ^^^^^Child
       4282024M1.PRT             VOLANT D'INERTIE    ^^^^^^^Grand Child
       1619032M1.PRT             COURONNE DEMARREUR  ^^^^^^^Grand Child
   4282010M1.PRT                 --                  ^^^Child             'Start of second block
   3786094M93.ASM                ENS DEMARREUR ISKR  ^^^Child
     3823621M94.PRT              DEMARREUR ISKRA     ^^^^^Grand Child
     3786093M1.PRT               --                  ^^^^^Grand Child
     3788193M1.PRT               --                  ^^^^^Grand Child
     3786092M1.PRT               --                  ^^^^^Grand Child
   4292572M1.PRT                 GARANT DE COLLECTE  ^^^Child
--- removed lots of lines in file -------            


The first block has 5 spaces for child lines; the second has 3 spaces. When the first line with 3 spaces is found it throws the error that is caught and used to reset the dictionary. If the two blocks had been in reverse order (i.e. 3 space child lines then 5 space child lines) there would be no possible hack.

Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis

modified on Monday, May 4, 2009 5:09 AM

GeneralMessage Closed Pin
3-May-09 23:32
vijay24823-May-09 23:32 
GeneralRe: IF ELSE or LOOP Pin
vijay24823-May-09 23:42
vijay24823-May-09 23:42 
GeneralRe: IF ELSE or LOOP Pin
riced3-May-09 23:45
riced3-May-09 23:45 
GeneralMessage Closed Pin
3-May-09 23:53
vijay24823-May-09 23:53 
GeneralRe: IF ELSE or LOOP Pin
riced4-May-09 0:45
riced4-May-09 0:45 
GeneralRe: IF ELSE or LOOP [SOLVED] Pin
vijay24824-May-09 1:33
vijay24824-May-09 1:33 
QuestionThe operation could not be completed. Not enough storage is available to complete this operation. Pin
nishkarsh_k28-Apr-09 23:14
nishkarsh_k28-Apr-09 23:14 
AnswerRe: The operation could not be completed. Not enough storage is available to complete this operation. Pin
Henry Minute28-Apr-09 23:51
Henry Minute28-Apr-09 23:51 
QuestionGetScreenResolution of client Pin
p_196028-Apr-09 22:44
p_196028-Apr-09 22:44 
AnswerRe: GetScreenResolution of client Pin
Jay Royall28-Apr-09 22:55
Jay Royall28-Apr-09 22:55 
GeneralRe: GetScreenResolution of client Pin
p_196028-Apr-09 23:44
p_196028-Apr-09 23:44 
GeneralRe: GetScreenResolution of client Pin
Jay Royall28-Apr-09 23:48
Jay Royall28-Apr-09 23:48 
QuestionProject ideas in vb Pin
innocent mwila28-Apr-09 21:54
innocent mwila28-Apr-09 21:54 
AnswerRe: Project ideas in vb Pin
Zaegra28-Apr-09 22:08
Zaegra28-Apr-09 22:08 
RantRe: Project ideas in vb Pin
Smithers-Jones30-Apr-09 4:14
Smithers-Jones30-Apr-09 4:14 
GeneralRe: Project ideas in vb Pin
innocent mwila5-May-09 4:36
innocent mwila5-May-09 4:36 
GeneralLicense Key generation. Pin
vedaharika28-Apr-09 18:59
vedaharika28-Apr-09 18:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.