Re: [Vala] How should an array be dynamically allocated?

2010-09-24 Thread JM
Hello Dynamiically allocated arrays are declared with 'string[] name'. You should try this code: int main() { string str = I am#*- a exa#*-mple string c#*-ontaini#*-ng non#*-sense; string[] sa = str.split(#*-); foreach(string s in sa) print(%s\n, s); return 0; } void

[Vala] How should an array be dynamically allocated?

2010-09-23 Thread Charles Hixson
This is what I attempted: /**convert a string (of the form output by to_string) into the fields *of the current instance*/ voidstr2bib(string str) {inti=count(str, @$gs); stringsflds[]=newstring [i]; sflds=