The following warnings occurred:
Warning [2] Undefined array key 9898 - 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 9900 - 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 9901 - 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 9908 - 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 9909 - 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 9908 - 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 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 array key 9909 - 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 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





A few HP-48 Questions



#6

1) What is a good editor for writing and viewing programs and text that leaves the text in a format that looks like it was when it was created? I mean, when I create a program, I use spacing and new lines to format the program but when I go back to edit it again, it is all run together in a string. Is there a program that will leave it in the format that it was created in.

2) Does the HP-48 support bitwise logic functions? I don't see that capability. Say one wants to mask a number so that only the first 16 bits are ever relevant. One might take a number and AND it with # FFFFh but I don't see how that is done in the 48. It seems to only use logic ANDing.

3) Are there any functions that can operate on a string so that programs can, say, grab the first 2 characters of a string or last X characters of a string?


#7

Mike,

Q1: If you're referring to UserRPL programs, the system does that, can't help. Otherwise, go to www.hpcalc.org and get a copy an editor from that site. I'm using ED from the Jazz library but you'll need more memory to store it.

Q2: Get an HP16 emulator from the aforementioned site.

Q3: Yes, several. Try one of the following built-in features:

String begin end SUB -> sub of string

String character POS -> position of character in string

String HEAD -> first character

Joe


#8

You said:
Q1: If you're referring to UserRPL programs, the system does that, can't help. Otherwise, go to www.hpcalc.org and get a copy an editor from that site. I'm
using ED from the Jazz library but you'll need more memory to store it.

Followup:
So there is no way to view User programs in any format but a run together string?

You said:
Q2: Get an HP16 emulator from the aforementioned site.

Followup:
I need more than an HP16 emulator. I need the ability to use string searches etc, as in question 3 along with the ability to manipulate, mask, shift etc on the value of the string characters. I don't think an HP16 emulator can manipulate strings. So, what I need are functions for bitwise logic functions, and string manipulations in a User Program.


#9

Mike,

I'm not certain about your first question as programs are entered not as strings but as commands delimited by white space. I know the operating system "beautifies" input - indents IF THEN structures, etc, etc.

As for the second part ... I'm don't have a direct answer but it is possible ... these things are programmable!

Joe

#10

2) YEs, the HP48 (and HP49) machines support all the normal bitwise functions. The commands are what you'd expect -- AND, OR, NOT, etc
The 2 arguments to these commands _must_ be 'binary numbers' -- that is to say they must be #nnnn. If they're real numbers, it uses a true/false sort of logic (0 is false, anything else is true), which is not what you want.
If you want to mask off all but the bottom 16 bits of a number first use R->B to convert it to binary, and then #FFFFh AND . You can use B->R to turn it back into a real number if you want to.
(3). There's the SUB command. It takes 3 arguments off the stack. The string in level 3, the first character position in level 2 (leftmost character is 1), and the last character position in level 1.
The arguments are removed from the stack, and the result returned to the stack as with every other command. For example
"HELLO WORLD" 3 7 SUB returnes "LLO W". The SIZE command can be useful to find the number of characters in a string so as to be able to calculate first and last character positions.
All these commands (string handling and bitwise) can be used in programs.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime questions: I/O and Meta programming Andy Gryc 2 1,478 10-31-2013, 11:22 PM
Last Post: Andy Gryc
  HP-41 questions x34 4 1,665 09-28-2013, 05:15 PM
Last Post: x34
  HP Prime two questions about function app dg1969 0 840 09-27-2013, 11:14 AM
Last Post: dg1969
  HP Prime Questions Clayton Workman 23 5,601 09-25-2013, 11:19 AM
Last Post: Clayton Workman
  Nibble reverse (HP-48,49,50g) Gerson W. Barbosa 44 11,835 07-28-2013, 10:10 PM
Last Post: Gerson W. Barbosa
  (OT) Pandigital expression (HP-48,49,50g) Gerson W. Barbosa 19 5,377 07-19-2013, 05:59 AM
Last Post: Gilles Carpentier
  Questions about building a RAM card for hp 48 Waon Shinyoe (China) 0 1,084 07-09-2013, 09:53 PM
Last Post: Waon Shinyoe (China)
  HP-71b questions jerome ibanes 6 2,145 07-01-2013, 05:03 PM
Last Post: Namir
  HP 41 Mcode related Questions Michael Fehlhammer 4 1,909 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  An unusual HP 71B - questions Doug (NYC) 8 2,558 01-16-2013, 08:14 AM
Last Post: Doug (NYC)

Forum Jump: