Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-30-2017, 03:52 AM   #1
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
bc - Command Line Calculator for Kindle!

Name: bc (Basic Calculator.. Bench Calculator)

Description: Command line based arbitrary precision calculator language, with syntax similar to C. Can be used as interactive shell or as scripting language.

History: Originally designed as a front end to dc (Desk Calculator) which used reverse polish notation.

Authors: Robert Morris and Lorinda Cherry (Unix version, 1975), Philip Nelson (GNU version, 1991)

Version: 1.06.95-9 (2014)

Porting: From Debian Armel Wheezy repository

Library dependencies: libtinfo.so.5, libreadline.so.6

Works on: possibly all kindles. tested ok on pw1, pw3 and kt3.

Needs: Jailbroken Kindle with kterm installed

Features:
  • - Arithmetic operators
  • - Increment and decrement operators
  • - Assignment operators
  • - Comparision or Relational Operators
  • - Logical or Boolean operators
  • - Math Functions
  • - Conditional statements
  • - Iterative statements
  • - Functions

Instructions:
  • Unzip attached file bc-kual.zip into /mnt/us/extensions
  • Select bc from KUAL menu
  • In the kterm window do as explained below
  • Try ./sier.sh to generate text mode sierpinski triangles

Usage:
  • - On the command line, like echo "1+2"|bc.
  • - Interactively, by entering bc first.. then 1+2. Exit by entering quit.
  • - By entering commands into a file.. then by entering bc < <filename>
  • - Also, scripts containing functions can be loaded as parameters and the functions defined in these scripts will then be available in interactive or CLI mode.
  • - There is a built-in library which is included by entering bc -l.
There is a detailed syntax using bases, scales, variables, operators, expressions, statements and functions.
See screenshots showing brief help and limits, pi calculated to 2000 places and a text mode Sierpinski fractal!
For more instructions and examples, see manual(inside zip) and links below.

Links:
Attachments:
  • - bc-kual.zip (executable, library files and sample scripts ready for loading into KUAL, user manual in text format)
  • - screenshots (brief help + limits, pi calculated to 2000 places, Text mode Sierpinski fractal)
Attached Thumbnails
Click image for larger version

Name:	bc-help-and-limits.png
Views:	190
Size:	31.4 KB
ID:	159225   Click image for larger version

Name:	pw1-pi-2000-places!.png
Views:	185
Size:	48.5 KB
ID:	159226   Click image for larger version

Name:	sierpinski.png
Views:	202
Size:	20.0 KB
ID:	159227  
Attached Files
File Type: zip bc-kual.zip (179.4 KB, 100 views)

Last edited by nasser; 09-30-2017 at 01:30 PM.
nasser is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ledger: Command Line Accounting on the Kindle! nasser Kindle Developer's Corner 0 08-23-2017 01:40 PM
Kindle Touch-open specific image by command line thaonphuong Kindle Developer's Corner 11 01-12-2016 03:46 AM
Need help using command line tsger Recipes 2 07-16-2011 03:23 AM
Kindle free book: Intelligence Was My Line: Inside Eisenhower's Other Command greencat Deals and Resources (No Self-Promotion or Affiliate Links) 0 06-15-2011 04:04 AM
Launching Kindle Previewer from command line? GRiker Kindle Developer's Corner 4 01-29-2011 08:00 PM


All times are GMT -4. The time now is 05:54 AM.


MobileRead.com is a privately owned, operated and funded community.