Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Logic problem?
Pages: [1] Print
Author Topic: Logic problem?  (Read 400 times)
kpeters
Newbie
*
Offline Offline

Posts: 24


View Profile
Logic problem?
« on: August 01, 2007, 07:13:02 PM »

Hi ~

the code below does not execute as expected - what am I doing wrong? table-empty evaluates to false as it should.

(As a newbie, I always appreciate code critique of all my code)

TIA,
Kai

Code:
table-empty:    [ either ( length? recs ) = 0 [ flash "No records in timesheet table" true ] [ false ]]

go-first:  [
   if  not table-empty  [   tsrecnum: 1    show-timesheet-record tsrecnum  ]
]

go-larst:  [
   if  not table-empty  [   tsrecnum: length? recs    show-timesheet-record tsrecnum  ]
]

Logged
Sunanda
Full Member
***
Offline Offline

Posts: 110


View Profile
Re: Logic problem?
« Reply #1 on: August 02, 2007, 07:13:20 AM »

Should that first line be:
    table-empty: DOES [....]
?
Logged
kpeters
Newbie
*
Offline Offline

Posts: 24


View Profile
Re: Logic problem?
« Reply #2 on: August 02, 2007, 01:38:13 PM »

Arghh - thank you!!
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Logic problem?
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 09:39:24 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2295 Posts in 593 Topics by 3763 Members
Latest Member: svolika

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc