Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/overhertz/domains/codeziron.com/public_html/ziron/ziron.db.connector.php on line 13 code:zIRON - Get the latest releases plus source-codes and tutorials - Simplifed Assembly Programming Language.
Register | Login
Forum Index > Requests and Feedback > case & string
Author Message
Pages: 1
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 638
Topics: 103

Location:
Alex, Egypt
[676] case & string - posted: 2011-11-12 21:13:34

sometimes i need to use case statement with a string
Code:
 
  pointer st = Ziron_GetStringValue();
  case (st) {

          state 'mystring':
                 ........
                 ........
                 brack; 
 


http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 925
Topics: 54

Location:
OverHertz Studio
[692] - posted: 2011-11-15 19:50:31
I may consider adding this, but not in any upcoming releases because i first need to finish optimizing other routines and finish adding the rest of the feature set, this feature is more of a high level helper (which will be good for simple tasks)

btw, it would be much better/faster to check manually something like:

Code:
//input
str = 'mystring';

//code
eax = str;
case (char[eax]) {
  state "m":
    if (char*[eax] == "myst" and char*[eax+4] == "ring") {
      //
    }
    break;

  state ....
}


I will hopefully add case on base expressions in an upcoming beta.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 638
Topics: 103

Location:
Alex, Egypt
[693] - posted: 2011-11-15 19:55:27

nice work around .

http://www.freewebs.com/ogremagic/index.htm
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 2 user(s) online. 0 member(s) and 2 guest(s)
Most users ever online was 533, May 5, 2016, 7:19 am.


Statistics:
Threads: 223 | Posts: 1837 | Members: 50 | Active Members: 50
Welcome to our newest member, NobodyAtWork
const Copyright = '2011-2018 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd