comparison doc/interpreter/basics.txi @ 21634:96518f623c91

Backed out changeset dcf8922b724b
author Mike Miller <mtmiller@octave.org>
date Wed, 20 Apr 2016 11:06:03 -0700
parents dcf8922b724b
children bac0d6f07a3e
comparison
equal deleted inserted replaced
21633:dcf8922b724b 21634:96518f623c91
308 Here is an example of using these functions to reproduce the command 308 Here is an example of using these functions to reproduce the command
309 line which invoked Octave. 309 line which invoked Octave.
310 310
311 @example 311 @example
312 @group 312 @group
313 fprintf ("%s", program_name ()); 313 printf ("%s", program_name ());
314 arg_list = argv (); 314 arg_list = argv ();
315 for i = 1:nargin 315 for i = 1:nargin
316 fprintf (" %s", arg_list@{i@}); 316 printf (" %s", arg_list@{i@});
317 endfor 317 endfor
318 fprintf ("\n"); 318 printf ("\n");
319 @end group 319 @end group
320 @end example 320 @end example
321 321
322 @noindent 322 @noindent
323 @xref{Indexing Cell Arrays}, for an explanation of how to retrieve objects 323 @xref{Indexing Cell Arrays}, for an explanation of how to retrieve objects
1036 @group 1036 @group
1037 #! /bin/octave -qf 1037 #! /bin/octave -qf
1038 printf ("%s", program_name ()); 1038 printf ("%s", program_name ());
1039 arg_list = argv (); 1039 arg_list = argv ();
1040 for i = 1:nargin 1040 for i = 1:nargin
1041 fprintf (" %s", arg_list@{i@}); 1041 printf (" %s", arg_list@{i@});
1042 endfor 1042 endfor
1043 printf ("\n"); 1043 printf ("\n");
1044 @end group 1044 @end group
1045 @end example 1045 @end example
1046 1046