The beauty of abreviations in Softanza

15 views
Skip to first unread message

Mansour Ayouni

unread,
May 12, 2022, 5:05:30 AMMay 12
to The Ring Programming Language
Hello All,

When using Softanza, you'll get a high feeling of EXPRESSIVENESS in every function provided. Sometimes you'll need more.

In practice, some functions are used extensively and need to be abbreviated in very short forms. Here is a snapshot of those abbreviations offered to you:

# Returning a number in the form of string using S() abbreviation

? S(12) #--> "12"


# Returning a list in the form of string using S() abbreviation

? S(["A","B","C"]) #--> '["A","B","C"]'


# Returning a list of strings from ♥1 to ♥2 using L() abbreviation

? L(' "♥1" : "♥5" ') #--> [ "♥1", "♥2", "♥3", "♥4", "♥5" ]


# Returning a contiguous list of strings in a non latin script using L() abbreviation

? L(' "كلمة1" : "كلمة3" ') #--> [ "كلمة3", "كلمة2", "كلمة1" ]


# Returning a list of 5 Empty items using L() abbreviation

? L(5) ) #--> [ "", "", "", "", "" ]


# Returning the list of chars in a string (containing no spaces) using L() abbreviation

? L("SOFTANZA") #--> [ "S", "O", "F", "T", "A", "N", "Z", "A" ]


# Returning a list by splitting the string using space using L() abbreviation

? L("Programming By Heart!") #--> [ "Programming", "By", "Heart" ]


# Returning a number hosted in string using N() abbreviation

? N("12") #--> 12


# Returning a number written in letters inside a string using N() abbreviation

? N("seven") #--> 7


# Return a number written in arabic letters inside a string using N() abbreviation ? ("سبعة") #--> 7


# Returning the number of items of a list using N() abbreviation

? N([ "A", "B", "C" ]) #--> 3


# Returning the number of items in a list histed in a string using N() abbreviation

? N("[ 1, 2, 3 ]") #--> 3


# Returning the number of chars in a string using N() abbreviation

? N("SOFTANZA") #--> 8


# Returning the list of numbers contained in the list using LoN() abbreviation

? LoN([ "A", 12, "B", 14, "C", 20 ]) #--> [12, 14, 20]


PS: You can test those features when I publish the next upgrade by the end of this week. For now, this is a snapshot of them working on my machine...

image.png


Best,

Mansour

Mahmoud Fayed

unread,
May 12, 2022, 3:33:14 PMMay 12
to The Ring Programming Language
Hello Mansour

Nice idea & example :D
I think the library is rich of nice features

Greetings,
Mahmoud

Mansour Ayouni

unread,
May 14, 2022, 6:53:39 AMMay 14
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

I'm glad you said this... They're just a few words but really help in these last miles of finishing the library!

Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/2db08be6-a2bc-4064-98d9-e298531044b1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages