Home > p2plib > asks.m

asks

PURPOSE ^

little function to ask user for number, with default

SYNOPSIS ^

function o=asks(s,i);

DESCRIPTION ^

 little function to ask user for number, with default

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % little function to ask user for number, with default
0002 function o=asks(s,i); 
0003 as=[s,'(default=',i,'):'];
0004 reply=input(as, 's'); 
0005 if isempty(reply) reply=i; end
0006 o=reply;
0007 end

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005