Character with $ sign

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Character with $ sign

Vicnet-2
Hello,

In smalltalk, sign $ with a character is a... character.
In Amber, it is not compiled.

Transcript show: $x. send a error.

I try to look at this pb in compiler.st without success.

a+
Vicnet

Reply | Threaded
Open this post in threaded view
|

Re: Character with $ sign

Nicolas Petton
That's simply because Amber doesn't have the Character class :)

Nico
On Apr 24, 2012, at 2:27 PM, Vicnet wrote:

Hello,

In smalltalk, sign $ with a character is a... character.
In Amber, it is not compiled.

Transcript show: $x. send a error.

I try to look at this pb in compiler.st without success.

a+
Vicnet



Reply | Threaded
Open this post in threaded view
|

Re: Character with $ sign

gokr
On 04/24/2012 02:39 PM, Nicolas Petton wrote:
> That's simply because Amber doesn't have the Character class :)

Please see this wiki page, it lists this and many other small
differences with regular Smalltalk:

https://github.com/NicolasPetton/amber/wiki/Porting-code-from-other-Smalltalk-dialects

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: Character with $ sign

Paul DeBruicker
And there are slime rules that will check your Pharo code using the refactoring browser  for all of those issues here:

Http://www.squeaksource.com/AmberSlime.html

Just run those against anything you want to port from Pharo to amber. It can automatically change Characters to Strings along with some other transformations.



On Apr 24, 2012, at 6:20 AM, Göran Krampe <[hidden email]> wrote:

> On 04/24/2012 02:39 PM, Nicolas Petton wrote:
>> That's simply because Amber doesn't have the Character class :)
>
> Please see this wiki page, it lists this and many other small differences with regular Smalltalk:
>
> https://github.com/NicolasPetton/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>
> regards, Göran
>
Reply | Threaded
Open this post in threaded view
|

Re: Character with $ sign

Vicnet-2

There is already a ticket on $ character here:
https://github.com/NicolasPetton/amber/issues/145

a+
Vicnet

Le mercredi 25 avril 2012 11:21:49 UTC+2, nicolas petton a écrit :
yep, good idea :)
-> issue tracker?

Nico

On Apr 25, 2012, at 1:42 AM, Amber Milan Eskridge wrote:

May it be wise to add a rule to the compiler that it accepts $ for single character strings?

On Tue, Apr 24, 2012 at 10:37 PM, Vicnet  wrote:

Thanks for all your answers.

I never see this wiki page before. I add in my bookmark preciously.

I also discover with this page AmberSlime, that seems fine to port code, but I could not start in Pharo 1.4.
In fact, I don't know how to run it !

I think I must use RefactoringBrowser but I have not this browser.
I that the correct way to use AmberSlime ?

a+
Vicnet

Le mardi 24 avril 2012 16:35:54 UTC+2, Paul DeBruicker a écrit :
And there are slime rules that will check your Pharo code using the refactoring browser  for all of those issues here:

Http://www.squeaksource.com/AmberSlime.html

Just run those against anything you want to port from Pharo to amber. It can automatically change Characters to Strings along with some other transformations.


On Apr 24, 2012, at 6:20 AM, Göran Krampe wrote:

> On 04/24/2012 02:39 PM, Nicolas Petton wrote:
>> That's simply because Amber doesn't have the Character class :)
>
> Please see this wiki page, it lists this and many other small differences with regular Smalltalk:
>
> https://github.com/NicolasPetton/amber/wiki/Porting-code-from-other-Smalltalk-dialects
>
> regards, Göran
>