Home | Stories | Reviews | TreoCast | Treo Store | Accessories | Software | Discussion at webOS Nation | Mobile | About | Search
 
treocentral.com >> Products & Reviews >> Software
NS Basic/Palm

Sun Sep 24, 2000 - 2:25 PM EDT - By Scott Hanselman

Dev Environ. & Conclusion

Once you've drawn a form or two, you can add action code “underneath” it.  For example, when a button is tapped on a calculator, or an item is select in a list, we'd execute code to handle that action or “event.”

The NS Basic/Palm Desktop, as it's called, includes a code editor that pops up when a control is double-clicked or right-clicked on at design time.  This is where all your code is written.  It's a good editor, and includes syntax highlighting, as see in Figure 2.


Figure 2: Syntax Highlighting

NS Basic supports over 150 commands and all common control structures.  So, IF, WHILE, FOR Loops – they're all there.  But it's the memory management that makes NS Basic so much easier than C, particularly when using Strings.  As we saw in Table 1, the PalmOS forces a programmer to be very aware about memory allocations.  When programming in C on the PalmOS, You have to allocate memory, hold a handle, lock it down to receive a pointer when you want to use it, then unlock and free it when you're done.  NS Basic frees you from that.

I can allocate a string, assign a value to it, and set a field to that string's value with this tiny bit of code.
Dim result as integer
Dim str as string
str = "scott"
fldSomeField.text = recordP.somestring

NS Basic also provides functions to access the PalmOS' built in database manager.  They are very flexible and provide all of the power of the Database, without much of the complexity.  For example, here's some code that spins through a database and populates a ListBox with the Data:
 
Res = dbReset(dbSomeData)
lstSomeList.clear
Do Until Not res = 0
Res = DbReadNext ( dbSomeData, temp)
if res = 0 then lstSomeList.add lstSomeList
Loop
Figure 3: Database Code Populating a ListBox

Conclusion

For under $100 with no runtime royalties, NS Basic/Palm is in a class by itself.  Save for a few UI glitches and stylistic issues, it’s an excellent product.  If you know BASIC, you’ll feel right at home.  If you've programmed for the Pilot in C, you’ll find that NS Basic’s built in functions mirror the PalmSDK’s quite accurately.



Treo accessory store

Criteria 

Rating

Features 4
Usability 4
Setup 5
Cost/Benefit 5
Overall
(not an average)
Pros
- Easy to Learn Basic
- Reasonable Runtime Size
- Visual Forms Editor
- Good Manual
- Inexpensive
- No royalties
Cons
- Can’t use Tables
- No Popup Help ala “AutoComplete”
- No View of Complete Code


 
User Opinions
Thumbs Up 57% Thumbs Down 43%

Read Opinions (7)


Would you recommend NS Basic/Palm?
Yes   No  

Product Info

References
Actions
> Print this page
> Digg!





Cases

Chargers

Bluetooth

Headsets

Keyboards

Memory
Protectors Cradles
Styli


More Treo Accessories

 Charger Kit
Palm Charger Kit for Centro, Treo
The charger kit for the jet set crowd
Just $9.95 BUY

More Wall Chargers
Retractable S&C Cable
Seidio Retractable S&C Cable for Centro, Treo
Reduce cable clutter!
Just $8.95 BUY

More USB Cables
Innocell 1750mAh Extended Battery
Seidio Innocell 1750mAh Extended Battery for Treo Pro

Just $42.95 BUY

More Batteries
SafeGuard Holster
SPE SafeGuard Holster for Treo 700p, 700w|wx, 650, 600
The best Treo holster yet!
Just $6.95 BUY

More Holsters
XGPS150 Universal Bluetooth GPS Receiver
Dual XGPS150 Universal Bluetooth GPS Receiver

Just $89.95 BUY

More GPS Receivers
Smart Phone Sleeper for HP Pre 3 / Palm Pre 2, Pre Plus, Pre / Centro, Treo Pro

Just $34.95 BUY

More Holders
kuel H10 Stylus Pen
SGP kuel H10 Stylus Pen

Just $12.99 BUY

More Styli
EHS60 3.5mm Stereo Headset
Samsung EHS60 3.5mm Stereo Headset

Just $22.95 BUY

More Stereo Headsets
Micro-USB Car Charger w/USB Port
Mobi Micro-USB Car Charger w/USB Port

Just $9.95 BUY

More Car Chargers
EHS63 3.5mm Stereo Headset
Samsung EHS63 3.5mm Stereo Headset

Just $42.95 BUY

More Stereo Headsets
ProDock Alumina
iBOLT ProDock Alumina

Just $34.95 BUY

More Car Mounts
Performance Mobile Earphones
Qmadix Performance Mobile Earphones

Just $34.95 BUY

More Stereo Headsets
Waterproof Pro-Sport Arm Pack
OverBoard Waterproof Pro-Sport Arm Pack

Just $31.95 BUY

More Weather Resistant Cases
 
 

Copyright 1999-2012 TreoCentral. All rights reserved : Terms of Use : Privacy Policy

TREO and TreoCentral are trademarks or registered trademarks of palm, Inc. in the United States and other countries;
the TreoCentral mark and domain name are used under license from palm, Inc.
The views expressed on this website are solely those of the proprietor, or
contributors to the site, and do not necessarily reflect the views of palm, Inc.
Read Merciful by Casey Adolfsson