The following warnings occurred:
Warning [2] Undefined array key 141871 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 141874 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 141875 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 141875 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





The HP41CX "ATIME" function question



#2

I currently am programming a recently aquired HP 42S with as many of my HP41Cx programs as possible.

Of course some need minor conversions to be adaptable but there is one function missing on the HP42S that the HP41cx has that I am having problems with.

I have a schedule program which, after running the HP41cx and the infared printer will output a rest schedule formatted for the printer. The program allows you to:

with the input of:

a. start time (24 hour clock, gmt)
b. finish time
c. number of breaks during the time period
d. enter a known 'long' period if you choose
e. enter a known 'short' period instead of the long period;
ex. I want the short period to be 1 hour and the rest to be
the long period or,
I want the long period to be 2 hours and the rest to be
the short (the following example).

the output is:

a. listing the start time and finish time
b. calculating the total time available
c. i. dividing that into equal periods based on the number of
breaks

or

ii. creating a schedule based on 2 short periods followed by 3
long periods followed by a short period.
(either the short or long periods can be pre defined to
create the above schedule; see above)

For example:

START= 22:35
END= 06:25
NUMBER OF BREAKS= 6
LONG BREAK= 2:00
and a selection of 2 short periods followed by 3 long followed by
one short (case ii above). This gives the following PRINTER
output:


START= 22:35
END= 06:25

TOTAL= 07:50

LONG= 02:00
SHORT= 00:36

# BREAKS= 6

22:35__23:11
23:11__23:48
23:48__01:48
01:48__03:48
O3:48__05:48
O5:48__06:25

The problem is the HP41CX has a wonderful all in one command that formats a decimal such as 6.25 into the alpha display 06:25. This command is the "ATIME" command. The HP42S has no such command and therefore I have to come up with a subroutine which will format the decimal HMS display to the clock time display.

I of course will call it LBL "ATIME" but currently being unfamiliar with the 42S am having a problem hacking a solution. As it stands the output is in decimal HMS mode and looks like this:

HP 42S output to the printer:

Start= 22.35
End= 6.25

Total= 7.50

Long= 2.00
Short= 0.36

# Breaks= 6

22.35__23.11
23.11__23.48
23.48__1.48
1.48__3.48
3.48__5.48
5.48__6.25

As you can see it does not line up as the preceding '0' is missing from the 3 digit time calculations. "ATIME" pre-attached the '0' to these digits.

Now I know how to test the 6.25 via alength and can send the offending time codes to the "ATIME" subroutine. I am however having trouble creating a routine to stick an 'alpha' zero in front of the 6.25. I am not that worried about the decimal point being a colon but for formatting the output (neatness freak!) I would like a routine that converts:

6.25 into 06.25

or better yet

6.25 into 06:25 as the HP41CX "ATIME" function does.

ANY takers for the challenge, which I will be working on tonight!

Cheers, Geoff wanting a neat output!!!!!


#3

Hi again... :-)

Assuming you "only" send to "ATIME" the times smaller than 10.00 and time is in "X" register:


01 LBL "ATIME"
02 FIX 02 (trims "hours" and "minutes" only)
03 CLA
04 "0" (inserts the heading "0")
05 ARCL ST X (appends the "time" from "X" register)
06 AVIEW (in case you need it, otherwise just use it directly from ALPHA register)
07 .END.

ARCL is in fact an Append function, so the time in "X" is just appended to the heading "0" placed into ALPHA in step 04.

Hope this helps.

Diego.


#4

I honestly thought I tried that, but I don't document, I just sit and hack around using my mind as a scratch pad.

Well I am just off to bed and will try that trick!

Cheers, and thanks, Geoff

PS yes the only time period that makes it to "atime" will have less than 4 digits as defined by alength:

for example  6.25 alength is 4
16.25 alength is 5
or

a number test; is 6.25 less than 10, yes GTO (a more elegant
solution)

Geoff


Edited: 14 Oct 2008, 1:50 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP50g: Writing a function that returns a function Chris de Castro 2 2,069 12-10-2013, 06:49 PM
Last Post: Han
  HP Prime EVAL function question Jonathan Cameron 2 1,296 09-28-2013, 08:58 PM
Last Post: Han
  HP41CX: Strange serial #... Stephan Matthys 1 1,132 09-13-2013, 01:38 PM
Last Post: Stephan Matthys
  Using PIL-BOX & ILPer to Transfer Programmes from PC to HP41CX? Michael Lopez 5 2,226 06-25-2012, 09:31 AM
Last Post: Michael Lopez
  Re: more HMS, aTIME, 34s display, 41c bugs? Christopher Johnson 0 888 03-05-2012, 11:20 AM
Last Post: Christopher Johnson
  more HMS, aTIME, 34s display, 41c bugs? Christopher Johnson 2 1,179 02-25-2012, 10:06 PM
Last Post: Luiz C. Vieira (Brazil)
  HP-80 Function Question Kerem Kapkin (Silicon Valley, CA) 10 2,742 02-14-2012, 02:09 AM
Last Post: Kerem Kapkin (Silicon Valley, CA)
  Science Project with HP41CX and Arduino? Fouad M. Kaadou 9 2,861 01-04-2012, 04:04 AM
Last Post: yves
  Strange HP41CX Problem - HELP! Fouad M. Kaadou 2 1,266 11-20-2011, 05:12 AM
Last Post: Fouad M. Kaadou
  Question about MROOT function Namir 15 3,537 11-09-2011, 02:16 PM
Last Post: Software49g

Forum Jump: