HP3000-L Archives

December 2006, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Fri, 29 Dec 2006 16:56:43 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Re:
> Thanks Greg; this works but why?
> 
> My two var's should have worked as well; I'm stumped!

My guess:  while doing calculations/expressions, MPEX keeps
more information about the type of a value ... so it 
knows that "datebuild(70,01,01)" has produced a "string"
of subtype "date".  When you do "date - date", it says
to itself: hmm...I know they're both dates, and does
a date difference calculation on them.

But, when you do "setvar d1 datebuild (70, 01, 01)", the
result is a "string" only.  Later, you're trying to do !d1-!d2,
it no longer knows that either one is a date and tries to parse both of
them ... and even when it manages to parse them "correctly", I'm not
sure it's "correct".

MPEX seems to have some difficulty handling dates entered as text:

% calc 06/08/01-06/07/04
-1095, $FFFFFBB9, %37777775671, #65535/#64441, "...."

% calc datebuild(6,8,1)-datebuild(6,7,4)
28, $1C, %34, "...."

and, my favorite:

%calc 1/2/3
03/01/02

Stan
-- 
Stan Sieler
[log in to unmask]
www.allegro.com/sieler/wanted/index.html 

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2