Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blockVal = get(hObject,'String');
- % TLTL appears in 1st row, 1st column
- % This should error check to make sure the string is between 0 and 9
- % 1st expression tests if blockVal is all numbers, 2nd expression
- % tests if blockVal is less than 0, 3rd expression tests if blockVal is
- % greater than 9, 4th expression tests if blockVal is an integer
- if (~(isstrprop(blockVal,'digit'))) || (str2num(blockVal) < 0) || ...
- (str2num(blockVal) > 9) || (isinteger(str2num(blockVal)))
- % Error about one digit numerics only
- errordlg('Block entries must be limited to the integers 0 to 9. 0 denotes any number possible.'...
- ,'One Digit Numeric Integers Only');
- else
- puzzle(1,1).block = blockVal;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement