Dear all
I am not an expert in programming at all and apologies for i, but could you tell me what I am doing wrong in the following piece of code:
test = {"* /Users/Esteban/Documents/Investigacion/Space_UVEG/PHI/SSStudy/Steady/BuckLT.asc",
"Vg N001 0 15V",
"Vdrv N004 N002 PULSE(0 10 0u 100n 100n 3.3u 10u)",
"Cf vCf 0 4.7u ic=86.1",
".model D D000"};
words = TextWords[test[[2]]]
words[[1]]
Do[
Print["i=", i]
Print[test[[i]]]
words = TextWords[test[[i]]]
Print[words[[1]]],
{i, 2, n}];
I am using the Print commands to see what happens within the loop. I want to see the first word of each line and do more things on each loop iteration, but so far I get just get an error message like:
Part::partd: Part specification words[[1]] is longer than depth of object. >>
words[[1]]
Set::write: Tag Times in words {Vg,N001,0,15V} is Protected. >>
What am I doing wrong? All the Procedure works well outside the loop, but not within the loop. How should a check what is going on within the loop?
I am sure that it must be a stupid thing.
Thank you,
Stefan