view test/octave.test/switch/switch-1.m @ 2968:e330cb788508

[project @ 1997-05-15 17:40:29 by jwe]
author jwe
date Thu, 15 May 1997 17:54:17 +0000
parents 31f6943ed944
children
line wrap: on
line source

a = 1;
b = 2;
c = 3;

switch 0 case 1 x = a; case 2 x = b; otherwise x = c; endswitch
switch 1 case 1 y = a; case 2 y = b; otherwise y = c; endswitch
switch 2 case 1 z = a; case 2 z = b; otherwise z = c; endswitch
switch 3 case 1 p = a; case 2 p = b; otherwise p = c; endswitch

x == c && y == a && z == b && p == c