[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading multiple files

From: Przemek Klosowski
Subject: Re: Loading multiple files
Date: Fri, 11 Mar 2005 10:49:10 -0500 (EST)

I wrote
   >Perl has a neat 'magical string increment' that tries to do a reasonable
   >thing on strings: s="001";s++ gives s="002", and s="abc";s++ gives s="abd".

and Quentin answered:

   I think there are usually easier ways to deal with this, as pointed out 
   in other responses to this thread. However, you are allowed to increment 
   elements of string variables in octave, so you could do a "magic 
   increment" doing something as simple as:

   octave:1> string = "abc";
   octave:2> string(end)+=1
   string = abd

It's not the same. In Perl, s="abz";s++ gives s="aca"; it really is magical :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]