Re: how test for empty sub-sequence?
- Posted by Irv Mullins <irv at ELLIJAY.COM> Jan 29, 2000
- 683 views
----- Original Message ----- From: Dan B Moyer <DANMOYER at PRODIGY.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Saturday, January 29, 2000 7:14 AM Subject: Re: how test for empty sub-sequence? > Kat, > > Yeah, that's such a good idea that I actually CAUSED my problem doing ALMOST > that very thing! What I had done was, I had previously stored "a" default > in it from one routine, but it was a text string, and my later code using it > expected a number there, & bombed when it saw the text & did ok when it got > the actual font size number from a different routine. What I had sorta > meant all along & forgot, was to put a default FONT SIZE in the variable, & > that would have probably worked just fine all along. When I finally made > the dang variable print out, it didn't have a number and it wasn't empty > either: it had my "default" test text in it. So if I HADN'T put "my" > default in, it probably would have resulted in the problem you suggested, > but putting "my" default value in (instead of a more valid one) MADE the > problem I experienced, sigh! Oh well, I THINK I'm learning, maybe. :) > It's a good thing I don't give up easily. This kind of thing happens to all of us. Point is, it shouldn't have to happen! If we could specify the type of each subsequence, we would be warned as soon as we tried to assign "Courier" to a subsequence which was previously defined to hold an integer or an atom. e.g: MyFont = {string Name, integer Size, integer Style} MyFont[Name] = 12 -- error MyFont[Size] = "Courier" -- error Irv