From dd829b65468c9f47be29261bf19beb0786d37d22 Mon Sep 17 00:00:00 2001 From: spotlessmind1975 Date: Wed, 4 Dec 2024 11:12:36 +0000 Subject: [PATCH] LEFT (instruction) vs LEFT (function) manual problem #1061 --- ugbc/src/targets/common/_infrastructure.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ugbc/src/targets/common/_infrastructure.c b/ugbc/src/targets/common/_infrastructure.c index 33d1fb625..0c89bcfa9 100755 --- a/ugbc/src/targets/common/_infrastructure.c +++ b/ugbc/src/targets/common/_infrastructure.c @@ -6662,11 +6662,6 @@ The numbering of characters in a string always starts at 1. If the specified number_of_characters is greater than the length of the string, ''LEFT$'' will return the entire string. -Make sure both string$ and substring$ are declared as strings (typically using -a $ at the end of the variable name). ''LEFT$'' is a very useful function for -manipulating strings in BASIC, allowing you to extract specific areas from -a longer string. - @italian La funzione ''LEFT$'' consente di estrarre una porzione di caratteri da @@ -6682,11 +6677,6 @@ La numerazione dei caratteri in una stringa inizia sempre da 1. Se il numero_di_caratteri specificato è maggiore della lunghezza della stringa, ''LEFT$'' restituirà l'intera stringa. -Assicurarsi che sia string$ che substring$ siano dichiarate come stringhe -(in genere utilizzando un $ alla fine del nome della variabile). LEFT$ è -una funzione molto utile per manipolare stringhe in BASIC, che consente -di estrarre aree specifiche da una stringa più lunga. - @syntax = LEFT( text, position ) @example x = LEFT( "TEST", 2 ) @@ -6758,12 +6748,11 @@ strings. The command has two parameters. The first parameter is the string expression to change. The second parameter is a numeric expression, indicating how -many characters to return. If 0, an empty string (''""'') is returned. +many characters to replace. If 0, no characters will be replaced. On the other hand, if greater than or equal to the number of characters -in string, the entire string is returned, untouched. - -To determine the number of characters in string, you should use -the ''LEN'' function. +in string, the entire string is replaced, up to the characters in ''expression''. +If ''position'' is greater than lenght of ''expression'', only the +characters of ''expression'' will be replaced. @italian