Scakk commented on a Page, $haddtok/$hremtok  -  Sep 13, 2008

I would redo the $haddtok as below.

alias haddtok {
  if ($isid) {
    hadd $iif(!$hget($1),-m) $1-2 $addtok($hget($1,$2),$4-,$3)
  }
}

New order would be --> $haddtok(Table,Item,C,Text)

1) Creates table if not created.
2) Allows entry of more than item into item.


Can shorten $hremtok to the below

alias hremtok {
  if ($isid) {
    if ( (!$hget($1)) || (!$hget($1,$2)) ) { echo -ag Error. No such $iif(!$hget($1), Table., Item.) }
    else { hadd $1-2 $remtok($hget($1,$2),$3,$4,$5) }
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.