|
2001-04-16
| ||
| 20:38 | • Ticket [218316ffff] switch statement does not support binary pattern matching</i... artifact: 0195f07382 user: dgp | |
|
2000-10-26
| ||
| 08:19 | • Closed ticket [218316ffff]. artifact: ea9958edd9 user: welch | |
| 00:56 | • New ticket [218316ffff]. artifact: 44e55da4fb user: nobody | |
switch statement does not support binary pattern matching
Closed / Fixed218316ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:03
OriginalBugID: 3765 Bug
Version: 8.0p2
SubmitDate: '1999-12-03'
LastModified: '1999-12-03'
Severity: CRIT
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Other
OSVersion: Lynx OS 3.0.0 (4/6/98)
Machine: ION Networks
FixedDate: '2000-10-25'
ClosedDate: '1999-12-03'
Name:
Rajesh Raghavan
Extensions:
ION Networks "NetworX" API
CustomShell:
none
ReproducibleScript:
set textPort [portOpen TELNET1%1]
set cdc [portOpen HOST1]
set cd9000 [portOpen HOST2]
set syncString [binary format H12 010000002627]
set syncStringTail [binary format H6 002627]
set alarmPollTail [binary format H8 01000505]
set head_zero [binary format H6 010000]
set head_three [binary format H6 010300]
while {$sync == "TRUE" } {
set cdcHead [multiRead $cdc 3 10 $textPort]
OutputLine $textPort "Scanning cdcHead"
binary scan $cdcHead H6 headhex
OutputLine $textPort "cdcHead = $headhex: Making decision"
switch -exact -- $cdcHead {
$head_zero {
OutputLine $textPort "head_zero: readTail CDC. Length unknown"
set cdcData [readTail $cdc $textPort]
OutputLine $textPort "Processing CDC Data"
...
}
}
$head_three {
OutputLine $textPort "head_three: readTail CDC"
set cdcData [readTail $cdc $textPort]
OutputLine $textPort "head_three: readAll CD9000"
set cd9K_Data [readAll $cd9000 $textPort]
}
default {
OutputLine $textPort "Lost synchronization"
set sync FALSE
}
}
ObservedBehavior:
The switch statement always goes to the default case, even when $cdcHead is verified to be the same as $head_zero or $head_three
Syntax of some extensions/procedures:
multiRead <port> <bytes to be read> <timeout> <debug port>
DesiredBehavior:
Continued execution of the program, as opposed to repetition of synchronization loop.
The user needs to upgrade to 8.2+.
-- 12/03/1999 hobbs
welch Closed ticket [218316ffff].
[History diff]2000-10-26 08:19:00
dgp Ticket [218316ffff]: 3 changes
[History diff]2001-04-16 20:38:35
Log in (anonymous is fine) to add a comment.