From: Robert Klemme Date: 2005-10-06T18:21:48+09:00 Subject: Re: Can ruby replace c? cmk128@hotmail.com wrote: > Hi > Can ruby replace c ? Or no, because ruby is a high level language !! > Can ruby write inline assembly? IIRC there is a project that allows incline C or assembly code. Someone with more specific memory out there? > Does ruby have linker script, so i can link any piece to a specific > address, i need this often in driver programming. Well, you can write C extensions. And there you can do pretty much everything C allows (if you respect some caveats, as mem allocation etc.). > In c, if i declare char[100], it consume 100 bytes, if in ruby, does > it have a datatype that represent one byte? I heard everything in ruby > is object, no exception, so the answer should be no. This is the closest you can get s = "\000" * 100 > Does ruby have pointer? a cpu-specific pointer? In 32 bit CPU, > pointer is 32 bits, in 16 bit CPU, pointer is 16 bits. No. And you don't need them and cannot use them in Ruby. You would have to deal with this in an extension. Kind regards robert