Documentation for /Users/balarsen/Documents/idl/larsen/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

expand_in_base.pro

topexpand_in_base

result = expand_in_base(number [, base], SIZE=SIZE, GET_SIZE=GET_SIZE)

expand a number in a different base

This must be both integer inputs and an integer base, can only expand in one base per call, base must fit in a byte (0-255)

Return value

an array with the expanded representation, one "digit" per element. The most significant digits are in the higher array elemets

Parameters

number in required

the number to expand

base in optional

the base to expand in (default 2)

Keywords

SIZE
GET_SIZE

Examples

IDL> print, reverse(expand_in_base(13346, 7)) 5 3 6 2 4 I print with the reverse() command as this is a left to right language (english) and IDL prints arrays right to left

Author information

History:

Tue Dec 16 10:04:12 2008, Brian Larsen fixed up, something broke this, maybe it never worked right Wed Oct 1 14:36:08 2008, Brian Larsen modifications for better behaviour Thu Mar 13 16:17:46 2008, Brian Larsen written and tested

Statistics

Lines: 52
McCabe complexity:

File attributes

Modifcation date: Tue Dec 16 11:00:37 2008
Lines: 98
Disclaimer