Multiple Function Returns?

Blitz3D Forums/Blitz3D Beginners Area/Multiple Function Returns?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I was trying to devise a Function that would splice a string that contained Comma-Separated values.

the problem being that the Return function only returns one variable, when I really need at least two.

Here's my prog so far.

Type items
Field it_name$
Field it_ref
Field it_component_ref
End Type

Type components
Field comp_ref
Field comp_b_ref
Field comp_c_ref
Field comp_item_ref
End Type

file=OpenFile("it_dat.txt")

	
Repeat



	create_items.items=New items
	temp_name$=ReadLine$(file)

	result$=Store_And_Remove$(temp_name$)
	create_items\it_name$=result$

Until Eof(file)


For list_items.items = Each items
	temp_ref=list_items\it_component_ref
	temp_name$=list_items\it_name$
		Print temp_ref+" : "+temp_name$
Next














Function Store_And_Remove$(main$)

comma=Instr(main$,Chr$(44),1)    ;find end of name
RV$=Left$(main$,(comma-1)) ;store name
main$=Right$(main$,((Len(main$)-(comma)))) ; remove name from dataline
WHAT_TO_DO_WITH_THIS$=main$;store remaining text

Return RV$

End Function





I need to return the value of
WHAT_TO_DO_WITH_THIS$ as well as RV$

Anyone got any tips?