Search found 80 matches

by Julcar
Jan 23, 2021 9:59
Forum: General
Topic: Accessing the highest ENUM value
Replies: 17
Views: 457

Re: Accessing the highest ENUM value

fxm wrote:Otherwise, I'm guessing your code isn't finished debugging yet, because I'm seeing some weird stuff.


Of course, it is even pre-beta stage, and a lot of bugs around there
by Julcar
Jan 23, 2021 7:45
Forum: General
Topic: Accessing the highest ENUM value
Replies: 17
Views: 457

Re: Accessing the highest ENUM value

... I don't see much point in using an ENUM structure compared to a simple discrete list of constants (except the auto-increment of values). In fact I was needing that functionality. http://chiselapp.com/user/julcar/repository/IguanaCMS/file?udc=1&ln=on&name=modules%2Fadmin.bas The ENUM def...
by Julcar
Jan 22, 2021 5:52
Forum: General
Topic: Accessing the highest ENUM value
Replies: 17
Views: 457

Re: Accessing the highest ENUM value

Yes, but things will go 'wrong' if you do this: 'Valid Options, just keep "Count" always at last position ENUM My_Options OPTION_0 = 0 OPTION_1 OPTION_2 = 4 OPTION_3 OPTION_4 Count END ENUM DIM ArrayOptions(0 TO My_Options.Count - 1) AS STRING = {"value1", "value2", &q...
by Julcar
Jan 21, 2021 21:41
Forum: General
Topic: Accessing the highest ENUM value
Replies: 17
Views: 457

Re: Accessing the highest ENUM value

'Valid Options, just keep "Count" always at last position ENUM My_Options OPTION_0 = 0 OPTION_1 OPTION_2 OPTION_3 OPTION_4 Count END ENUM DIM ArrayOptions(0 TO My_Options.Count - 1) AS STRING = {"value1", "value2", "value3", "value4", "value5&q...
by Julcar
Jan 21, 2021 8:06
Forum: General
Topic: Accessing the highest ENUM value
Replies: 17
Views: 457

Accessing the highest ENUM value

Hi all, Let's suppose I have this enum ENUM my_enum value0 = 0 value1 value2 value3 value4 END ENUM If I do DIM v AS my_enum it will have the lowest value, printing it just says "0" I want an alternative to know the highest value in the enum regardless the number of values inside. Just lik...
by Julcar
Jan 19, 2021 1:37
Forum: Projects
Topic: My dummy JSON Parser-generator
Replies: 0
Views: 108

My dummy JSON Parser-generator

Hi coders! I've just commited to my repository a dummy JSON Parser/Generator for using it with my CMS project. Here you can find it: http://chiselapp.com/user/julcar/repository/IguanaCMS/file?name=libs/json.bi http://chiselapp.com/user/julcar/repository/IguanaCMS/file?name=libs/json-parser.bas http:...
by Julcar
Dec 23, 2020 8:11
Forum: Linux
Topic: Why do graphics programs require libtinfo/ncurses?
Replies: 9
Views: 901

Re: Why do graphics programs require libtinfo/ncurses?

Hi xlucas, I am also interested on this. I mostly compile for the web, not needing to display to console, but still I have to carry on with the ncurses dependency which makes grow my binaries
by Julcar
Nov 02, 2020 6:00
Forum: General
Topic: Help to decide: Sqlite vs self-implemented no-sqlite engine
Replies: 3
Views: 296

Help to decide: Sqlite vs self-implemented no-sqlite engine

hello guys, I have to choose an option for the data storage of my freebasic web application. Currently I have a dummy file-based key/value data storage, but has its limits, so I am thinking big: Could I use SQLite 3 for data storage (that implies a depedency to 3rd party code) or Could I port a no-s...
by Julcar
Sep 29, 2020 16:53
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Re: Execute function stored as string literal

By curiosity, I downloaded your project, compiled it and ran it, without having any idea of what it is. :) Here is what I get: [roland@localhost Iguana CMS-7d1a3fe5b0]$ ./index Content-Type: text/html; Charset= [roland@localhost Iguana CMS-7d1a3fe5b0]$ What is the program supposed to do? Well, if y...
by Julcar
Sep 29, 2020 7:50
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Re: Execute function stored as string literal

Thankyou so much guys, this commit is dedicated to those who gave me a hand yesterday: http://chiselapp.com/user/julcar/reposi ... e5b03821d8
by Julcar
Sep 28, 2020 23:11
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Re: Execute function stored as string literal

In this file I have a module loader procedure that receipts the request query string http://chiselapp.com/user/julcar/repository/IguanaCMS/file?name=index.bas&ci=7348021f6d25c4f62801f78bf7248997d595ba3f In modules.bas I select-case the module name and execute the proper function declared in modu...
by Julcar
Sep 28, 2020 22:52
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Re: Execute function stored as string literal

In FB you simply write (procedure) Identifier(argument-list): Sub PrintMSG(ByVal MSG As String) Print MSG End Sub PrintMSG("Hi, there") PrintMSG("current time: " + Time) PrintMSG("current date: " + Date) #Ifdef __FB_PCOS__ Sleep #endif is something way more complex (se...
by Julcar
Sep 28, 2020 21:44
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Re: Execute function stored as string literal

Looks just what I was looking for.

Another question: can the pointer variable be Dimmed as Shared or stored in an array?

Thanks so much
by Julcar
Sep 28, 2020 20:58
Forum: General
Topic: Execute function stored as string literal
Replies: 15
Views: 637

Execute function stored as string literal

Hi, maybe this was asked before, or sounds crazy but anyway, here comes let's supposse I have something like this: Sub mySub() Print "hello world!" End Sub Dim as string theSubToExec theSubToExec = "mySub" Call (theSubToExec) And thus, the last line would execute the procedure......
by Julcar
Sep 25, 2020 7:42
Forum: Community Discussion
Topic: Reinventing the wheel
Replies: 17
Views: 1090

Re: Reinventing the wheel

Not sure if this should go here or in "Programming". It really is about programming, but it's a philosophical topic, so... that's why. Since I started programming, about 25 years ago, I have been criticised a few times for one particular thing and I've seen other being criticised for that...

Go to advanced search