Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Logic problem?
Pages: [1] Print
Author Topic: Logic problem?  (Read 386 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: 100


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?
October 08, 2008, 02:29:45 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2245 Posts in 589 Topics by 2259 Members
Latest Member: edibritrava

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

RT design by Defiant Pc