• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Manfred please help

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for previous reply.I would appreciate if you help in making changes to the program below in order to get the following result:
field1[0]| val1|
field2[0]|val2|
|val3|
[5]|val4|
|val5|
|val6|
field3[2]|val1|
|val3|
|val4|
[5]|val5|

The required output is one object or vector or any other suitable data str per field
In a following way:
field1 index zero(the value in square bracket) should have value “val1”
field2 index zero(the value in sqaure bracket) should have value “va2”
field2 index one(the square bracket is absent, so value in above square bracket should be incremented by one) should have value “val3”
field2 index two should have value “null”
field2 index three should have value “null”
field2 index four should have value “null”
filed2 index 5 should have value “val4”
filed2 index 6 should have value “val5”
filed2 index 7 should have value “val6”
filed3 index zero should have value “null”
Filed3 index 1 should have value “null”
Filed3 index 2 should have value “val1”
Filed3 index 3 should have value “val3”
Filed3 index 4 should have value “null”
Field3 index 5 should have value “val5”
The program is :
package mypackage;

Thanks,
smita
edited by Dave to use code tags
[ February 12, 2002: Message edited by: Dave Vick ]
 
peter brews
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please advise in making changes to the program below in order to get the following result:
field1[0]| val1|
field2[0]|val2|
|val3|
[5]|val4|
|val5|
|val6|
field3[2]|val1|
|val3|
|val4|
[7]|val5|
The required output is one object (or vector or any other suitable data str)per field
In a following way:
In vector:
Vector - field1( val1)
Vector field2(val2,val3,null,null,null,val4,val5,val6)
Vector field3(null,null,val1,val3,val4,null,null,val5)
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Smita,
Assuming you have given me the input.txt file. The following code should work.

Regards,
Manfred.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic