Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inputting integers only from a text file.

Status
Not open for further replies.

UNH1995

Technical User
Nov 20, 2001
5
0
0
US
I have a file that I need to read in line coordinates from inorder to find the vectors and cross products. I always struggle with inputting from a file so I need some help.

The file is in this format:

L1= (35,70) (35,4) L2 =(63,4) (75,91)
L1= (65,91) (16,26) L2 =(92,61) (93,89)
L1= (77,3) (50,35) L2 =(39,5) (27,32)
L1= (10,30) (68,47) L2 =(51,23) (30,82)
L1= (9,95) (64,64) L2 =(17,52) (27,91)
L1= (3,11) (64,84) L2 =(2,24) (54,43)
L1= (56,45) (41,2) L2 =(68,65) (84,48)
L1= (20,75) (54,99) L2 =(2,20) (90,84)

The numbers represent the endpoints of each lines (2 lines). I need to extract only the numbers, prefferably in order and perform some calculations on them. Can anyone tell me how to evaluate a line at a time or pull out only the numbers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top