SRL Archive - Help and Support

God! Can SCAR handle binary and octal?


R0b0t1

2007-10-05 20:53:55

To note, I have tried all of the common signs: for example, binary, % and 0b do not work, nor does #, @, or 0o for octal.


So, is there a secret way or no way?

Smartzkid

2007-10-05 20:57:48

Not that I know of. Hex isn't Octal, correct? Cause I know it can do hex…

EDIT: Meh, ofcourse hex isn't octal. Don't know what I was thinking :p

R0b0t1

2007-10-06 09:19:31

Lol :p.

Octal: 0-7

Wizzup?

2007-10-06 09:52:04

Just look at Yakmans tutorial and you will see it can handle binary..

mastaraymond

2007-10-06 11:33:47

From: Wizzup?
Just look at Yakmans tutorial and you will see it can handle binary..
That are bitwise operations ^^, i haven't found a way to get the binary of a integer… Of integer of a binary :-(.

ruler

2007-10-06 11:43:05

X(

Ejjman

2007-10-06 12:43:37

From: ruler
X(


Whats that suppose to mean :D

Markus

2007-10-06 12:47:48

Hmm, it looks like some weird smiley.

Bebe

2007-10-06 15:57:17

Ruler spam…. :p

SKy Scripter

2007-10-06 16:39:09

Bebe spam….:p X)

Killerdou

2007-10-06 16:43:47

more spam?

R0b0t1

2007-10-07 20:56:29

RAWR~!


How to I tell SCAR that this number: 1001, stands for nine in stead of 1,001?

Harry

2007-10-07 20:58:54

Hey! Rawr is my word! xD

RAM

2007-10-07 21:31:09

From: R0b0t1
RAWR~!


How to I tell SCAR that this number: 1001, stands for nine in stead of 1,001?



1001 = 9 : ?

Green Eggs and Spam ?

Smartzkid

2007-10-07 21:32:48

binary 1001 = decimal 9

Boreas

2007-10-07 23:40:15

function BinToDec(Bin:integer):integer;
var mystr:string;
i:integer;
begin
mystr:= inttostr(bin);
for i:=length(mystr) downto 1 do
if mystr[i]='1' then
result:= result+ round(pow(2.0,(length(mystr)-i)*1.0));
end;

function DecToBin(Dec:integer):integer;
var i:integer;
tmptotal,i2:integer;
mystr:string;
begin
while not (round(pow(2.0,i*1.0))>Dec) do
i:=i+1;
for i2:=i downto 1 do
begin
tmptotal:=tmptotal+(round(pow(2.0,(i2-1)*1.0)));
if not (tmptotal>dec) then
begin
mystr:=mystr+'1';
end else
begin
tmptotal:=tmptotal-(round(pow(2.0,(i2-1)*1.0)));
mystr:=mystr+'0';
end;
end;
result:=strtoint(mystr);
end;

Must be an easier way.

Edit: yup http://delphi.about.com/od/mathematics/a/baseconvert.htm

R0b0t1

2007-10-08 17:26:13

OMG!